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. … #8317

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/__init__.py:743:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /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:94:26 - 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 
+ 303 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 

dedupe (https://github.com/dedupeio/dedupe)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:105:44 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:299:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:555:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:610:35 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:870:50 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:888:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/api.py:1557:26 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:21:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:22:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:55:15 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:56:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:101:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:178:12 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:218:12 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:288:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:304:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/clustering.py:319:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/core.py:88:17 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/core.py:107:6 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/core.py:161:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/core.py:195:41 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/core.py:209:23 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/dedupe/dedupe/core.py:221:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 164 errors, 1 warning, 0 informations 
+ 187 errors, 1 warning, 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 

pandera (https://github.com/pandera-dev/pandera)
+   /tmp/mypy_primer/projects/pandera/pandera/api/polars/components.py:113:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/api/polars/components.py:120:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/api/polars/container.py:42:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/api/polars/container.py:49:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/api/polars/utils.py:13:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/backends/pandas/checks.py:47:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/backends/pyspark/checks.py:46:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/backends/pyspark/decorators.py:20:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:49:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:50:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:63:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:64:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:66:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:352:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:353:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/numpy_engine.py:365:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:145:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:145:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:159:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:159:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:185:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:579:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:579:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:635:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:635:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:712:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:713:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:740:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:830:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:864:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:865:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:872:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:872:48 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:914:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:914:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:958:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:959:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:962:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:962:48 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:973:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:973:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1148:39 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1148:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1188:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1188:58 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1209:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1209:62 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1247:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1307:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1307:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1421:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1440:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1440:55 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1997:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:1997:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:2023:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/pandas_engine.py:2023:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/polars_engine.py:63:40 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/polars_engine.py:563:25 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/polars_engine.py:585:25 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /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/pandera/engines/utils.py:42:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pandera/pandera/engines/utils.py:43:6 - error: Variable not allowed in type expression (reportInvalidTypeForm)

... (truncated 9 lines) ...

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/annotated_handlers.py:32:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /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:320:48 - 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:329:56 - 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)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:445:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:490:43 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:523:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:541:34 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:981:17 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1270:54 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1305:64 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1329:38 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1498:54 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1512:39 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1564:54 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:1881:49 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:2172:54 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_metadata.py:45:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_utils.py:54:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_utils.py:60:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_utils.py:61:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_utils.py:66:13 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_utils.py:67:16 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_core_utils.py:286:46 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_discriminated_union.py:426:60 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_generate_schema.py:206:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_generate_schema.py:1790:49 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_generate_schema.py:2254:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_schema_generation_shared.py:36:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 258 errors, 46 warnings, 0 informations 
+ 289 errors, 46 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)
- 24880 errors, 358 warnings, 0 informations 
+ 24901 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)

... (truncated 633 lines) ...```