microsoft / pyright

Static Type Checker for Python
Other
13.04k stars 1.39k forks source link

Fixed a recent regression that results in a false positive when the f… #8381

Closed erictraut closed 1 month ago

erictraut commented 1 month ago

…ully-qualified form of typing.Request is used in an annotation expression. This addresses #8375.

github-actions[bot] commented 1 month ago

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

Tanjun (https://github.com/FasterSpeeding/Tanjun)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:6828:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:6829:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:6936:14 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7023:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7113:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7148:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7212:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7278:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7356:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7423:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7487:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7551:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7614:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7660:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7766:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7830:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7865:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7900:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:7973:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8041:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8105:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8169:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8237:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8301:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8339:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8412:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8476:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8544:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8614:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8680:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8772:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8854:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8872:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:8890:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 2550 errors, 6685 warnings, 0 informations 
+ 2516 errors, 6685 warnings, 0 informations