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

Improved consistency of unreachable code. Previously, unreachable cod… #8190

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

erictraut
Copy link
Collaborator

…e was not supported for if or else suites when the condition type was narrowed to Never. This addresses microsoft/pylance-release#6028.

…e was not supported for `if` or `else` suites when the condition type was narrowed to `Never`. This addresses microsoft/pylance-release#6028.
Copy link
Contributor

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

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/appsec/_iast/taint_sinks/_base.py:132:28 - error: Expected no arguments to "Evidence" constructor (reportCallIssue)
-   /tmp/mypy_primer/projects/dd-trace-py/tests/utils.py:1303:17 - error: Expression of type "datetime" is incompatible with declared type "int"
-     "datetime" is incompatible with "int" (reportAssignmentType)
- 11603 errors, 583 warnings, 0 informations 
+ 11601 errors, 583 warnings, 0 informations 

pandera (https://github.com/pandera-dev/pandera)
-   /tmp/mypy_primer/projects/pandera/tests/core/test_schema_components.py:475:52 - error: Cannot access attribute "tolist" for class "Iterable[Unknown]"
-     Attribute "tolist" is unknown (reportAttributeAccessIssue)
- 2032 errors, 25 warnings, 0 informations 
+ 2031 errors, 25 warnings, 0 informations 

trio (https://github.com/python-trio/trio)
-   /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_run.py:2271:12 - error: Type of "coro" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_run.py:2271:12 - error: Type of "throw" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_run.py:2272:28 - error: Type of "Error" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_run.py:2273:10 - error: Type of "raises" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/trio/src/trio/_subprocess_platform/waitid.py:108:9 - error: Argument type is partially unknown
-     Argument corresponds to parameter "args" in function "spawn_system_task"
-     Argument type is "*tuple[Unknown, Event]" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/trio/src/trio/_tests/test_channel.py:384:10 - error: Type of "raises" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/trio/src/trio/_tests/test_channel.py:390:14 - error: Type of "raises" is unknown (reportUnknownMemberType)
- 3760 errors, 52 warnings, 0 informations 
+ 3753 errors, 52 warnings, 0 informations 

@erictraut erictraut merged commit b841e11 into main Jun 20, 2024
11 checks passed
@erictraut erictraut deleted the issue6028-4 branch June 20, 2024 15:00
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.

1 participant