microsoft / pyright

Static Type Checker for Python
Other
13.12k stars 1.4k forks source link

Fixed a bug that resulted in incorrect evaluation when converting a c… #8837

Closed erictraut closed 2 weeks ago

erictraut commented 2 weeks ago

…onstructor to a callable and the constructed class has a metaclass with a __call__ method whose cls parameter is annotated with type[T]. This addresses https://github.com/microsoft/pylance-release/issues/6297.

rchiodo commented 2 weeks ago

Thanks :)

github-actions[bot] commented 2 weeks 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/tanjun/annotations.py:1466:66 - error: Unnecessary "# pyright: ignore" rule: "reportArgumentType" (reportUnnecessaryTypeIgnoreComment)
- 2518 errors, 6680 warnings, 0 informations 
+ 2519 errors, 6680 warnings, 0 informations