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

Fix module and protocol subtyping, module hasattr #13778

Merged
merged 3 commits into from
Oct 2, 2022

Conversation

hauntsaninja
Copy link
Collaborator

@github-actions

This comment has been minimized.

@hauntsaninja hauntsaninja marked this pull request as ready for review September 30, 2022 05:52
@hauntsaninja hauntsaninja changed the title Fix module and protocol subtyping Fix module and protocol subtyping, module hasattr Sep 30, 2022
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/inspect.py:361: error: Unused "type: ignore" comment
+ sphinx/util/inspect.py:364: error: Unused "type: ignore" comment
+ sphinx/util/inspect.py:367: error: Unused "type: ignore" comment
+ sphinx/util/compat.py:21: error: Unused "type: ignore" comment

pylint (https://github.com/pycqa/pylint)
+ pylint/checkers/utils.py:286: error: Unused "type: ignore" comment
+ pylint/checkers/utils.py:286: error: Unsupported right operand type for in (Module)  [operator]
+ pylint/checkers/utils.py:286: note: Error code "operator" not covered by "type: ignore" comment

werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/_reloader.py:23: error: Unused "type: ignore" comment

anyio (https://github.com/agronholm/anyio)
+ src/anyio/streams/tls.py:108: error: Unused "type: ignore" comment

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/core/templates.py:78: error: Unused "type: ignore" comment

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, thanks! (see however my comment in the issue)

@ilevkivskyi ilevkivskyi merged commit 34f5cec into python:master Oct 2, 2022
@hauntsaninja hauntsaninja deleted the moduletype-getattr branch October 2, 2022 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modules as protocols doesn't type-check against the protocol
2 participants