Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix module and protocol subtyping, module hasattr - #13778

Merged
ilevkivskyi merged 3 commits into
python:masterfrom
hauntsaninja:moduletype-getattr
Oct 2, 2022
Merged

Fix module and protocol subtyping, module hasattr#13778
ilevkivskyi merged 3 commits into
python:masterfrom
hauntsaninja:moduletype-getattr

Conversation

@hauntsaninja

Copy link
Copy Markdown
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
Copy Markdown
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

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

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