GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — Support exhaustive checking for “in” operator. by Malika1109 · Pull Request #16593 · python/mypy Conversation
|
These are all false positives, so the PR has some bugs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ab62edd to
ec1c3d4
Compare
…th following format
for more information, see https://pre-commit.ci
…ore merging and commenting
…ore merging and commenting
for more information, see https://pre-commit.ci
not needed for PR, since tests should cover this
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
Diff from mypy_primer, showing the effect of this PR on open source code: black (https://github.com/psf/black) + src/black/__init__.py:530:17: error: Statement is unreachable [unreachable] + src/black/__init__.py:835:17: error: Statement is unreachable [unreachable] + src/black/concurrency.py:139:9: error: Statement is unreachable [unreachable] trio (https://github.com/python-trio/trio) + src/trio/_dtls.py:367: error: Need type annotation for "messages_by_seq" (hint: "messages_by_seq: Dict[<type>, <type>] = ...") [var-annotated] mkosi (https://github.com/systemd/mkosi) + mkosi/config.py:343:9: error: Statement is unreachable [unreachable] + mkosi/qemu.py:428:13: error: Right operand of "or" is never evaluated [unreachable] + mkosi/qemu.py:432:13: error: Statement is unreachable [unreachable] + mkosi/qemu.py:551:13: error: Statement is unreachable [unreachable] + mkosi/distributions/ubuntu.py:27:13: error: Statement is unreachable [unreachable] + mkosi/__init__.py:1356:5: error: Statement is unreachable [unreachable] + mkosi/__init__.py:1381:5: error: Statement is unreachable [unreachable] + mkosi/__init__.py:2309:13: error: Statement is unreachable [unreachable] + mkosi/__init__.py:2802:9: error: Statement is unreachable [unreachable] + mkosi/__init__.py:2805:5: error: Statement is unreachable [unreachable] discord.py (https://github.com/Rapptz/discord.py) - discord/automod.py:316: error: Argument 1 to "_from_value" of "ArrayFlags" has incompatible type "object"; expected "Sequence[int]" [arg-type] - discord/automod.py:316: error: Argument "allow_list" to "AutoModTrigger" has incompatible type "object"; expected "list[str] | None" [arg-type] - discord/automod.py:321: error: Argument "mention_limit" to "AutoModTrigger" has incompatible type "object"; expected "int | None" [arg-type] - discord/automod.py:322: error: Argument "mention_raid_protection" to "AutoModTrigger" has incompatible type "object"; expected "bool | None" [arg-type] - discord/automod.py:327: error: Missing return statement [return] + discord/scheduled_event.py:466: error: Need type annotation for "metadata" (hint: "metadata: Dict[<type>, <type>] = ...") [var-annotated] - discord/scheduled_event.py:533: error: Incompatible types in assignment (expression has type "None", target has type "str") [assignment] - discord/scheduled_event.py:555: error: Incompatible types in assignment (expression has type "dict[str, str]", target has type "str") [assignment] + discord/scheduled_event.py:555: error: Incompatible types in assignment (expression has type "dict[Any, Any]", target has type "str") [assignment] + discord/voice_state.py:278: error: Unused "type: ignore" comment [unused-ignore] + discord/voice_state.py:285: error: Unused "type: ignore" comment [unused-ignore] + discord/guild.py:2400: error: Unused "type: ignore" comment [unused-ignore] + discord/guild.py:3136: error: Need type annotation for "metadata" (hint: "metadata: Dict[<type>, <type>] = ...") [var-annotated] - discord/guild.py:3209: error: Incompatible types in assignment (expression has type "dict[str, str]", target has type "str") [assignment] + discord/guild.py:3209: error: Incompatible types in assignment (expression has type "dict[Any, Any]", target has type "str") [assignment] + discord/client.py:2578: error: Unused "type: ignore" comment [unused-ignore] - discord/app_commands/tree.py:413: error: Missing return statement [return] - discord/app_commands/tree.py:533: error: Missing return statement [return] urllib3 (https://github.com/urllib3/urllib3) + src/urllib3/poolmanager.py:570: error: Argument 1 to "get" of "dict" has incompatible type "str | None"; expected "str" [arg-type] streamlit (https://github.com/streamlit/streamlit) + lib/streamlit/runtime/runtime.py: note: In function "stop": + lib/streamlit/runtime/runtime.py:307:13: error: Statement is unreachable [unreachable] + lib/streamlit/runtime/runtime.py: note: In member "connect_session" of class "Runtime": + lib/streamlit/runtime/runtime.py:371:9: error: Statement is unreachable [unreachable] + lib/streamlit/runtime/runtime.py: note: In member "handle_backmsg" of class "Runtime": + lib/streamlit/runtime/runtime.py:479:9: error: Statement is unreachable [unreachable] + lib/streamlit/runtime/runtime.py: note: In member "handle_backmsg_deserialization_exception" of class "Runtime": + lib/streamlit/runtime/runtime.py:509:9: error: Statement is unreachable [unreachable] + lib/streamlit/runtime/runtime.py: note: In member "is_ready_for_browser_connection" of class "Runtime": + lib/streamlit/runtime/runtime.py:526:13: error: Statement is unreachable [unreachable] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks, this logic has been rewritten a few times since this PR, #21456 and preceding PRs fix the relevant issue |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Support exhaustiveness checking for 'in' statements (enums)
There was an error while loading. Please reload this page.