Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy: Python objects do not correctly implement their interfaces - missing __jsii_proxy_class__ #2923

Closed
1 of 5 tasks
rectalogic opened this issue Jul 24, 2021 · 3 comments
Closed
1 of 5 tasks
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@rectalogic
Copy link
Contributor

rectalogic commented Jul 24, 2021

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Go

General Information

What is the problem?

Running mypy on Python CDK code fails. Objects do not implement their interfaces:

/tmp/m.py:18: error: Argument "vpc" to "SecurityGroup" has incompatible type "Vpc"; expected "IVpc"
/tmp/m.py:18: note: "Vpc" is missing following "IVpc" protocol member:
/tmp/m.py:18: note:     __jsii_proxy_class__

See aws/aws-cdk#15651 for more details.

A variation on this was originally fixed in #2809 but now it is broken again.

@rectalogic rectalogic added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2021
@gshpychka
Copy link

Maybe edit the name to narrow down the scope, as it seems there are multiple issues that result in incorrect interface implementations, like this one:

#2927

@rectalogic rectalogic changed the title mypy: Python objects do not correctly implement their interfaces mypy: Python objects do not correctly implement their interfaces - missing __jsii_proxy_class__ Jul 28, 2021
@rectalogic
Copy link
Contributor Author

Just tested with aws-cdk-lib 2.0.0rc27, constructs 10.0.9, jsii 1.41.0 and this is resolved.

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants