IAM: Python type IPrincipal is incompatible with ServicePrincipal #31454
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p3
Describe the bug
This bug was already reported previously #30431.
Not sure why it was not addressed and the issue closed, so opening a new one.
The AWS plugin in VSCode is quite extensive so it seems to be a very encouraged tool to use for AWS development, but this bug makes the coding experience very poor.
Also the
_statement
parameter looks very weirdand if it's called like that instead of
statement
like it is inIPrincipal
for a reason it's seems like an ugly hack.If you think that you are doing the correct thing with regards to python typing then we should start a discussion about it with pyright developers.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
I'm expecting to not get typing errors when writing the code as it is intended.
Current Behavior
Raises typing error.
Reproduction Steps
See #30431
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.154.1 (build febce9d)
Framework Version
No response
Node.js Version
v20.12.2
OS
Ubuntu 22.04.4 LTS
Language
Python
Language Version
Python 3.12
Other information
No response
The text was updated successfully, but these errors were encountered: