-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update mypy to 1.11 #4500
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
Update mypy to 1.11 #4500
Conversation
| ] | ||
| new_commands = [ | ||
| # Type the same as distutils.command.install.install.sub_commands | ||
| new_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing invariance issues when trying to append install.new_commands to install.sub_commands at the end of this module
| 'params', | ||
| WHEEL_INSTALL_TESTS, | ||
| ids=list(params['id'] for params in WHEEL_INSTALL_TESTS), | ||
| ids=[params['id'] for params in WHEEL_INSTALL_TESTS], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a necessary change, but I noticed this improvement whilst I was looking at this line. After realizing the best fix was an annotation change, I left this line as a comprehension. Would've been caught by https://docs.astral.sh/ruff/rules/unnecessary-generator-list/
I can revert this line if you'd prefer no runtime change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with it. Thanks for highlighting!
85e6c42 to
3aba4d4
Compare
| 'params', | ||
| WHEEL_INSTALL_TESTS, | ||
| ids=list(params['id'] for params in WHEEL_INSTALL_TESTS), | ||
| ids=[params['id'] for params in WHEEL_INSTALL_TESTS], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with it. Thanks for highlighting!
Summary of changes
follow_imports = silentcomment to be more generalized / future-prooftypes-setuptoolsfrom typeshed. Right now a CI failure is expected almost every version, especially as more annotations are added to setuptools, and fixes upstreamed to typeshed. Which would require a lock, then unlock PRs everytime (more churn than just locking and updating when ready), or non-obvious fixes (mainly due to distutils subtyping). Oncetypes-setuptoolsis obsoleted, things should be more stable. @jaracoGoes towards unblocking #4352
Closes #4432
Pull Request Checklist
newsfragments/. (no user facing changes)(See documentation for details)