microsoft / pyright

Static Type Checker for Python
Other
12.7k stars 1.35k forks source link

Improved detection of the use of variables used in type annotations. … #8318

Closed erictraut closed 1 week ago

erictraut commented 1 week ago

…These are illegal according to the typing spec.

This addresses #8316.

github-actions[bot] commented 1 week ago

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


pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/pytest/robot_file_support.py:72:21 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/pytest/robot_file_support.py:83:36 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:217:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:226:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:259:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:298:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/utils.py:184:26 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 294 errors, 18 warnings, 0 informations 
+ 301 errors, 18 warnings, 0 informations 

black (https://github.com/psf/black)
+   /tmp/mypy_primer/projects/black/src/black/trans.py:397:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 73 errors, 9 warnings, 0 informations 
+ 74 errors, 9 warnings, 0 informations 

freqtrade (https://github.com/freqtrade/freqtrade)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/persistence/custom_data.py:29:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/persistence/key_value_store.py:32:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/persistence/pairlock.py:17:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/persistence/trade_model.py:77:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/persistence/trade_model.py:1606:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 597 errors, 43 warnings, 0 informations 
+ 602 errors, 43 warnings, 0 informations 

scrapy (https://github.com/scrapy/scrapy)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/engine.py:266:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/scraper.py:80:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/scraper.py:81:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/scraper.py:152:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/scraper.py:184:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/scraper.py:196:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/scrapy/scrapy/core/scraper.py:278:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 2086 errors, 132 warnings, 0 informations 
+ 2093 errors, 132 warnings, 0 informations 

pydantic (https://github.com/pydantic/pydantic)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:320:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:329:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:330:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 258 errors, 46 warnings, 0 informations 
+ 261 errors, 46 warnings, 0 informations 

pandera (https://github.com/pandera-dev/pandera)
-   /tmp/mypy_primer/projects/pandera/pandera/backends/pyspark/decorators.py:20:61 - error: Expression of type "None" cannot be assigned to parameter of type "List[Type[Unknown]]"
+   /tmp/mypy_primer/projects/pandera/pandera/backends/pyspark/decorators.py:20:61 - error: Expression of type "None" cannot be assigned to parameter of type "List[Type[PysparkDefaultTypes]]"
-     "None" is incompatible with "List[Type[Unknown]]" (reportArgumentType)
+     "None" is incompatible with "List[Type[PysparkDefaultTypes]]" (reportArgumentType)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pyspark_engine.py:93:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pyspark_engine.py:93:56 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pyspark_engine.py:98:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pyspark_engine.py:98:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/tests/core/test_decorators.py:779:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/tests/io/test_io.py:961:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/tests/io/test_io.py:962:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
-   /tmp/mypy_primer/projects/pandera/tests/io/test_io.py:961:23 - error: Expected type expression but received "_DataTypeClass[Unknown] | ((_DataTypeClass[Unknown]) -> _DataTypeClass[Unknown])"
-     "(_DataTypeClass[Unknown]) -> _DataTypeClass[Unknown]" is not a class (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/pandera/tests/io/test_io.py:962:23 - error: Expected type expression but received "_DataTypeClass[Unknown] | ((_DataTypeClass[Unknown]) -> _DataTypeClass[Unknown])"
-     "(_DataTypeClass[Unknown]) -> _DataTypeClass[Unknown]" is not a class (reportGeneralTypeIssues)
- 2385 errors, 25 warnings, 0 informations 
+ 2390 errors, 25 warnings, 0 informations 

core (https://github.com/home-assistant/core)
+   /tmp/mypy_primer/projects/core/homeassistant/config_entries.py:483:35 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/core.py:1296:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/core.py:1386:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/core.py:1889:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/loader.py:765:41 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/api/__init__.py:390:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/config/config_entries.py:549:11 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:108:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:133:48 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:170:36 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:190:51 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:214:48 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:221:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/dashboard.py:230:72 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/lovelace/websocket.py:104:6 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/components/websocket_api/commands.py:511:35 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+ /tmp/mypy_primer/projects/core/homeassistant/helpers/area_registry.py
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/area_registry.py:74:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/device_registry.py:349:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/device_registry.py:404:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/entity_registry.py:323:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/core/homeassistant/helpers/entity_registry.py:405:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 24881 errors, 358 warnings, 0 informations 
+ 24902 errors, 358 warnings, 0 informations 

kornia (https://github.com/kornia/kornia)
+   /tmp/mypy_primer/projects/kornia/kornia/constants.py:87:54 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:26:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:26:66 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:67:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:78:36 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:97:39 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:97:50 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:102:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:104:25 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:106:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:110:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:114:47 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:114:89 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:118:78 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:140:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:141:21 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:153:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:171:36 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:174:26 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:191:77 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:204:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:204:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:204:94 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:207:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:207:65 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:207:100 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:254:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:255:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:257:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:258:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:264:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:265:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:267:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:268:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:275:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:276:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:278:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:280:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:317:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:318:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:320:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:322:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:354:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:356:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:391:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:393:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:425:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:426:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:428:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:430:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:454:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:455:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:457:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:458:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:464:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:465:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:467:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:468:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:475:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:477:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:485:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:487:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:495:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:497:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:505:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:507:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:514:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/kornia/kornia/augmentation/base.py:515:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)

... (truncated 4052 lines) ...

steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/examples/csgo/casket.py
+   /tmp/mypy_primer/projects/steam.py/examples/csgo/casket.py:13:26 - error: Type of "inventory" is partially unknown
+     Type of "inventory" is "Overload[(app: Unknown, *, language: object = ...) -> Coroutine[Any, Any, Backpack], (app: App[str | None], *, language: Language | None = None) -> Coroutine[Any, Any, Inventory[Item[ClientUser], ClientUser]]]" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/steam.py/examples/tf2/autocraft.py
+   /tmp/mypy_primer/projects/steam.py/examples/tf2/autocraft.py:16:26 - error: Type of "inventory" is partially unknown
+     Type of "inventory" is "Overload[(app: Unknown, *, language: object = ...) -> Coroutine[Any, Any, Backpack], (app: App[str | None], *, language: Language | None = None) -> Coroutine[Any, Any, Inventory[Item[ClientUser], ClientUser]]]" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/steam.py/steam/abc.py:546:15 - error: Return type, "FavouriteBadge[PartialApp[str | None] | Unknown, PartialUser] | None", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/steam.py/steam/abc.py:546:76 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/steam.py/steam/abc.py:546:76 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/steam.py/steam/badge.py:155:24 - error: Type of parameter "self" is partially unknown
+     Parameter type is "BaseOwnedBadge[Unknown, PartialUser]" (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/steam.py/steam/badge.py:155:53 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/steam.py/steam/badge.py:155:53 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/steam.py/steam/badge.py:189:54 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/steam.py/steam/badge.py:189:54 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/steam.py/steam/badge.py:197:9 - error: Type of "__init__" is partially unknown
+     Type of "__init__" is "(state: ConnectionState, id: int, level: int, app: PartialApp[str | None] | Unknown, owner: UserT@UserBadge, community_item_id: int | str | None) -> None" (reportUnknownMemberType)
- 8454 errors, 90 warnings, 0 informations 
+ 8465 errors, 90 warnings, 0 informations 

pandas (https://github.com/pandas-dev/pandas)
+   /tmp/mypy_primer/projects/pandas/pandas/_libs/lib.pyi:151:45 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandas/pandas/_libs/lib.pyi:154:6 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandas/pandas/_libs/lib.pyi:157:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandas/pandas/_libs/lib.pyi:158:51 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 561 errors, 2 warnings, 0 informations 
+ 565 errors, 2 warnings, 0 informations 

rotki (https://github.com/rotki/rotki)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:202:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:654:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:656:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:657:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:658:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:659:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:660:14 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:682:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:682:80 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:718:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:838:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/rotkehlchen.py:838:69 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/types.py:355:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/types.py:356:17 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/types.py:398:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/types.py:399:17 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/types.py:899:14 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:1821:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:1836:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:1877:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:2104:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:2116:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:2194:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:3290:39 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:3976:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:3979:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:4109:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/rest.py:4261:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/fields.py:678:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/fields.py:691:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:658:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:1883:48 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:1888:51 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:2038:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:2598:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:2828:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:2909:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/resources.py:3012:33 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/schemas.py:1908:6 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/api/v1/schemas.py:2385:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+ /tmp/mypy_primer/projects/rotki/rotkehlchen/assets/asset.py
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/assets/asset.py:31:14 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/assets/asset.py:469:18 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/assets/asset.py:496:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+ /tmp/mypy_primer/projects/rotki/rotkehlchen/assets/types.py
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/assets/types.py:62:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)

... (truncated 433 lines) ...```