-
Notifications
You must be signed in to change notification settings - Fork 246
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 Type Failures #2464
Labels
Comments
MrArnoldPalmer
added
bug
This issue is a bug.
effort/medium
Medium work item – a couple days of effort
p1
labels
Jan 23, 2021
RomainMuller
added a commit
that referenced
this issue
Jan 25, 2021
Updated the type annotations of the jsii runtime for Python so that the decorators carry appropriate type signatures. Additionally, enhanced the code generation for Python so that mypy errors that are difficult or impossible to address are ignored by the tool without requiring specific user configuration. Fixes #2464
RomainMuller
added a commit
that referenced
this issue
Jan 26, 2021
It's been a couple of times `mypy` breaks the pipeline by releasing new versions that are more strict or start checking things it used to silently ignored. In order to avoid this happening in the future (and putting us back in control), this pins the `mypy` version to the exact release (the last we successfully built with, in this case), and moves everything we install though `pip install` into `requirements-dev.txt` files so that @dependabot can help us stay up-to-date going forward. Fixes #2464
mergify bot
pushed a commit
that referenced
this issue
Jan 26, 2021
It's been a couple of times `mypy` breaks the pipeline by releasing new versions that are more strict or start checking things it used to silently ignored. In order to avoid this happening in the future (and putting us back in control), this pins the `mypy` version to the exact release (the last we successfully built with, in this case), and moves everything we install though `pip install` into `requirements-dev.txt` files so that @dependabot can help us stay up-to-date going forward. Fixes #2464 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
|
mergify bot
pushed a commit
that referenced
this issue
Jan 27, 2021
Updated the type annotations of the jsii runtime for Python so that the decorators carry appropriate type signatures. Additionally, enhanced the code generation for Python so that mypy errors that are difficult or impossible to address are ignored by the tool without requiring specific user configuration. Relates to #2464, #2476 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 Bug Report
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
What is the problem?
Python code generated by jsii-pacmak fails mypy type checks. This doesn't seem to have been triggered by code changes in JSII so is likely the result of an update to mypy or another related lib.
Adding
# type: ignore
comments can resolve some of these errors easily, additional logic may be required to only add these comments where needed so we aren't suppressing valid type errors. Not sure what the exact cause is though.Verbose Log
The text was updated successfully, but these errors were encountered: