[ty] Use infer_type_expression for parsing parameter annotations and return-type annotations#24353
Conversation
Typing conformance resultsThe percentage of diagnostics emitted that were expected errors held steady at 86.76%. The percentage of expected errors that received a diagnostic held steady at 81.53%. The number of fully passing files held steady at 70/132. SummaryHow are test cases classified?Each test case represents one expected error annotation or a group of annotations sharing a tag. Counts are per test case, not per diagnostic — multiple diagnostics on the same line count as one. Required annotations (
True positives changed (63)63 diagnostics
False positives changed (22)22 diagnostics
|
Memory usage reportSummary
Significant changesClick to expand detailed breakdownflake8
trio
sphinx
prefect
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-type-form |
0 | 2 | 802 |
escape-character-in-forward-annotation |
0 | 0 | 5 |
| Total | 0 | 2 | 807 |
Showing a random sample of 211 of 809 changes. See the HTML report for the full diff.
Raw diff sample (211 of 809 changes)
Expression (https://github.com/cognitedata/Expression)
- tests/test_tagged_union.py:336:32 error[invalid-type-form] Function `Face` is not valid in a type expression
+ tests/test_tagged_union.py:336:32 error[invalid-type-form] Function `Face` is not valid in a parameter annotation
Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/abc.py:1087:62 error[invalid-type-form] Function `float` is not valid in a type expression
+ tanjun/abc.py:1087:62 error[invalid-type-form] Function `float` is not valid in a return type annotation
archinstall (https://github.com/archlinux/archinstall)
- archinstall/lib/boot.py:117:65 error[invalid-type-form] Function `SysCommandWorker` is not valid in a type expression
+ archinstall/lib/boot.py:117:65 error[invalid-type-form] Function `SysCommandWorker` is not valid in a return type annotation
beartype (https://github.com/beartype/beartype)
- beartype/_check/checkmake.py:137:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/checkmake.py:137:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_convcoerce.py:73:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_convcoerce.py:73:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/convert/_convcoerce.py:279:27 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_convcoerce.py:279:27 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_convcoerce.py:279:36 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_convcoerce.py:279:36 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/convert/_reduce/_nonpep/api/redapinumpy.py:41:37 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_nonpep/api/redapinumpy.py:41:37 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/pep484/redpep484core.py:150:34 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/pep484/redpep484core.py:150:34 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/pep484585/redpep484585generic.py:158:50 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/pep484585/redpep484585generic.py:158:50 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/pep484585/redpep484585itemsview.py:34:52 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/pep484585/redpep484585itemsview.py:34:52 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/convert/_reduce/_pep/redpep544.py:118:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep544.py:118:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/redpep557.py:21:47 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep557.py:21:47 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/convert/_reduce/_pep/redpep589.py:22:39 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep589.py:22:39 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/convert/_reduce/_pep/redpep591.py:25:30 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep591.py:25:30 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/redpep646.py:96:36 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep646.py:96:36 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/redpep646.py:96:45 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep646.py:96:45 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/convert/_reduce/_pep/redpep673.py:24:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep673.py:24:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_pep/redpep695.py:188:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_pep/redpep695.py:188:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/_redrecurse.py:126:22 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/_redrecurse.py:126:22 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/redmain.py:472:29 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/redmain.py:472:29 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/convert/_reduce/redmain.py:663:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/convert/_reduce/redmain.py:663:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/error/errcause.py:625:34 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/error/errcause.py:625:34 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/forward/fwdresolve.py:53:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/forward/fwdresolve.py:53:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/forward/fwdresolve.py:129:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/forward/fwdresolve.py:129:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/forward/reference/_fwdrefmeta.py:440:68 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/forward/reference/_fwdrefmeta.py:440:68 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/forward/reference/_fwdrefmeta.py:767:44 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/forward/reference/_fwdrefmeta.py:767:44 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/forward/scope/fwdscopecls.py:255:46 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/forward/scope/fwdscopecls.py:255:46 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/metadata/call/callmetadecormin.py:149:10 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/metadata/call/callmetadecormin.py:149:10 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_check/metadata/hint/hintsmeta.py:648:28 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/metadata/hint/hintsmeta.py:648:28 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_check/pep/checkpep484typevar.py:80:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_check/pep/checkpep484typevar.py:80:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484/pep484604union.py:206:62 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484/pep484604union.py:206:62 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_util/hint/pep/proposal/pep484/pep484union.py:26:50 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484/pep484union.py:26:50 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_util/hint/pep/proposal/pep484585/generic/pep484585genget.py:1002:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/generic/pep484585genget.py:1002:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484585/generic/pep484585genget.py:1245:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/generic/pep484585genget.py:1245:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484585/generic/pep484585genget.py:1597:51 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/generic/pep484585genget.py:1597:51 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484585/generic/pep484585gentest.py:34:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/generic/pep484585gentest.py:34:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484585/generic/pep484585gentest.py:281:46 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/generic/pep484585gentest.py:281:46 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484585/pep484585args.py:23:34 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/pep484585args.py:23:34 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep484585/pep484585callable.py:321:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep484585/pep484585callable.py:321:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep544.py:52:37 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep544.py:52:37 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep544.py:108:35 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep544.py:108:35 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep557.py:22:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep557.py:22:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep557.py:27:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep557.py:27:6 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_util/hint/pep/proposal/pep585.py:40:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep585.py:40:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep585.py:79:41 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep585.py:79:41 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep593.py:26:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep593.py:26:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep593.py:92:35 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep593.py:92:35 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep593.py:194:73 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep593.py:194:73 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_util/hint/pep/proposal/pep646/pep484612646typevar.py:136:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep646/pep484612646typevar.py:136:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep646/pep646692unpack.py:585:42 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep646/pep646692unpack.py:585:42 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- beartype/_util/hint/pep/proposal/pep695.py:185:33 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep695.py:185:33 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/proposal/pep749/pep649749annotate.py:235:21 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/proposal/pep749/pep649749annotate.py:235:21 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/utilpepget.py:192:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/utilpepget.py:192:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/utilpepget.py:299:42 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/utilpepget.py:299:42 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/utilpepget.py:621:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/utilpepget.py:621:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/utilpepget.py:679:39 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/utilpepget.py:679:39 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/utilpepget.py:997:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/utilpepget.py:997:11 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/_util/hint/pep/utilpeptest.py:471:30 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/_util/hint/pep/utilpeptest.py:471:30 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- beartype/door/_cls/doormeta.py:70:51 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ beartype/door/_cls/doormeta.py:70:51 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/plotting/_geo_feature.pyi:109:49 error[invalid-type-form] Function `array` is not valid in a type expression
+ src/bokeh/plotting/_geo_feature.pyi:109:49 error[invalid-type-form] Function `array` is not valid in a return type annotation
core (https://github.com/home-assistant/core)
- homeassistant/components/assist_pipeline/vad.py:61:24 error[invalid-type-form] Function `bytes` is not valid in a type expression
+ homeassistant/components/assist_pipeline/vad.py:61:24 error[invalid-type-form] Function `bytes` is not valid in a return type annotation
- homeassistant/components/matrix/__init__.py:324:33 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ homeassistant/components/matrix/__init__.py:324:33 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- homeassistant/components/matrix/__init__.py:480:38 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ homeassistant/components/matrix/__init__.py:480:38 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- homeassistant/core.py:1261:32 error[invalid-type-form] Variable of type `under_cached_property[Unknown]` is not allowed in a type expression
+ homeassistant/core.py:1261:32 error[invalid-type-form] Variable of type `under_cached_property[Unknown]` is not allowed in a return type annotation
cwltool (https://github.com/common-workflow-language/cwltool)
- tests/test_singularity.py:374:16 error[invalid-type-form] Function calls are not allowed in type expressions
+ tests/test_singularity.py:374:16 error[invalid-type-form] Function calls are not allowed in return type annotations
django-stubs (https://github.com/typeddjango/django-stubs)
- django-stubs/contrib/gis/gdal/envelope.pyi:30:24 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ django-stubs/contrib/gis/gdal/envelope.pyi:30:24 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- django-stubs/contrib/gis/gdal/geometries.pyi:115:47 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ django-stubs/contrib/gis/gdal/geometries.pyi:115:47 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- django-stubs/contrib/gis/gdal/geometries.pyi:163:25 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ django-stubs/contrib/gis/gdal/geometries.pyi:163:25 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- django-stubs/contrib/gis/geos/collections.pyi:13:24 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ django-stubs/contrib/gis/geos/collections.pyi:13:24 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- django-stubs/contrib/gis/geos/point.pyi:30:24 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ django-stubs/contrib/gis/geos/point.pyi:30:24 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- django-stubs/contrib/gis/geos/point.pyi:30:37 error[invalid-type-form] `...` is not allowed in this context in a type expression
- django-stubs/contrib/gis/geos/polygon.pyi:20:24 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ django-stubs/contrib/gis/geos/polygon.pyi:20:24 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- django-stubs/contrib/staticfiles/finders.pyi:15:59 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in type expression
+ django-stubs/contrib/staticfiles/finders.pyi:15:59 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in a return type annotation
- django-stubs/contrib/staticfiles/finders.pyi:19:16 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in type expression
+ django-stubs/contrib/staticfiles/finders.pyi:19:16 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in a type expression
- django-stubs/contrib/staticfiles/finders.pyi:27:59 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in type expression
+ django-stubs/contrib/staticfiles/finders.pyi:27:59 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in a return type annotation
- django-stubs/contrib/staticfiles/finders.pyi:35:11 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in type expression
+ django-stubs/contrib/staticfiles/finders.pyi:35:11 error[invalid-type-form] Invalid subscript of object of type `def list(self, ignore_patterns: Iterable[str] | None) -> Iterable[Any]` in a type expression
- django-stubs/utils/datastructures.pyi:92:23 error[invalid-type-form] Invalid subscript of object of type `def dict(self) -> Unknown` in type expression
+ django-stubs/utils/datastructures.pyi:92:23 error[invalid-type-form] Invalid subscript of object of type `def dict(self) -> Unknown` in a return type annotation
ibis (https://github.com/ibis-project/ibis)
- ibis/backends/clickhouse/tests/test_client.py:313:35 error[invalid-type-form] Variable of type `Int64` is not allowed in a type expression
+ ibis/backends/clickhouse/tests/test_client.py:313:35 error[invalid-type-form] Variable of type `Int64` is not allowed in a parameter annotation
- ibis/backends/datafusion/udfs.py:18:51 error[invalid-type-form] Variable of type `Int32` is not allowed in a type expression
+ ibis/backends/datafusion/udfs.py:18:51 error[invalid-type-form] Variable of type `Int32` is not allowed in a return type annotation
- ibis/backends/datafusion/udfs.py:30:63 error[invalid-type-form] Variable of type `Int32` is not allowed in a type expression
+ ibis/backends/datafusion/udfs.py:30:63 error[invalid-type-form] Variable of type `Int32` is not allowed in a return type annotation
- ibis/backends/datafusion/udfs.py:42:68 error[invalid-type-form] Variable of type `Int32` is not allowed in a type expression
+ ibis/backends/datafusion/udfs.py:42:68 error[invalid-type-form] Variable of type `Int32` is not allowed in a return type annotation
- ibis/backends/datafusion/udfs.py:46:37 error[invalid-type-form] Variable of type `Time` is not allowed in a type expression
+ ibis/backends/datafusion/udfs.py:46:37 error[invalid-type-form] Variable of type `Time` is not allowed in a parameter annotation
- ibis/backends/datafusion/udfs.py:46:49 error[invalid-type-form] Variable of type `Int32` is not allowed in a type expression
+ ibis/backends/datafusion/udfs.py:46:49 error[invalid-type-form] Variable of type `Int32` is not allowed in a return type annotation
- ibis/backends/datafusion/udfs.py:107:44 error[invalid-type-form] Variable of type `Int32` is not allowed in a type expression
+ ibis/backends/datafusion/udfs.py:107:44 error[invalid-type-form] Variable of type `Int32` is not allowed in a return type annotation
- ibis/expr/types/json.py:106:46 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ ibis/expr/types/json.py:106:46 error[invalid-type-form] Variable of type `property` is not allowed in a parameter annotation
jax (https://github.com/google/jax)
- jax/experimental/mosaic/gpu/dialect_lowering.py:2579:33 error[invalid-type-form] Variable of type `Never` is not allowed in a type expression
+ jax/experimental/mosaic/gpu/dialect_lowering.py:2579:33 error[invalid-type-form] Variable of type `Never` is not allowed in a parameter annotation
jinja (https://github.com/pallets/jinja)
- src/jinja2/environment.py:399:27 error[escape-character-in-forward-annotation] Escape characters are not allowed in type expressions
+ src/jinja2/environment.py:399:27 error[escape-character-in-forward-annotation] Escape characters are not allowed in parameter annotations
- src/jinja2/environment.py:1177:27 error[escape-character-in-forward-annotation] Escape characters are not allowed in type expressions
+ src/jinja2/environment.py:1177:27 error[escape-character-in-forward-annotation] Escape characters are not allowed in parameter annotations
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- gridfs/asynchronous/grid_file.py:288:75 error[invalid-type-form] Invalid subscript of object of type `def list(self, session: AsyncClientSession | None = None) -> CoroutineType[Any, Any, Unknown]` in type expression
+ gridfs/asynchronous/grid_file.py:288:75 error[invalid-type-form] Invalid subscript of object of type `def list(self, session: AsyncClientSession | None = None) -> CoroutineType[Any, Any, Unknown]` in a return type annotation
mypy (https://github.com/python/mypy)
- mypy/typeshed/stdlib/_curses_panel.pyi:22:25 error[invalid-type-form] Function `window` is not valid in a type expression
+ mypy/typeshed/stdlib/_curses_panel.pyi:22:25 error[invalid-type-form] Function `window` is not valid in a return type annotation
- mypy/typeshed/stdlib/builtins.pyi:213:54 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:213:54 error[invalid-type-form] `...` is not allowed in this context in a parameter annotation
- mypy/typeshed/stdlib/builtins.pyi:625:56 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:625:56 error[invalid-type-form] `...` is not allowed in this context in a parameter annotation
- mypy/typeshed/stdlib/builtins.pyi:688:56 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:688:56 error[invalid-type-form] `...` is not allowed in this context in a parameter annotation
- mypy/typeshed/stdlib/builtins.pyi:803:40 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:803:40 error[invalid-type-form] `...` is not allowed in this context in a return type annotation
- mypy/typeshed/stdlib/builtins.pyi:834:75 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:834:75 error[invalid-type-form] `...` is not allowed in this context in a parameter annotation
- mypy/typeshed/stdlib/builtins.pyi:961:68 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:961:68 error[invalid-type-form] `...` is not allowed in this context in a return type annotation
- mypy/typeshed/stdlib/builtins.pyi:965:65 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:965:65 error[invalid-type-form] `...` is not allowed in this context in a return type annotation
- mypy/typeshed/stdlib/builtins.pyi:1014:36 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:1014:36 error[invalid-type-form] `...` is not allowed in this context in a parameter annotation
- mypy/typeshed/stdlib/builtins.pyi:1892:29 error[invalid-type-form] `...` is not allowed in this context in a type expression
+ mypy/typeshed/stdlib/builtins.pyi:1892:29 error[invalid-type-form] `...` is not allowed in this context in a return type annotation
- mypy/typeshed/stdlib/sqlite3/__init__.pyi:275:33 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ mypy/typeshed/stdlib/sqlite3/__init__.pyi:275:33 error[invalid-type-form] Variable of type `property` is not allowed in a return type annotation
- mypy/typeshed/stdlib/sqlite3/__init__.pyi:287:41 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ mypy/typeshed/stdlib/sqlite3/__init__.pyi:287:41 error[invalid-type-form] Variable of type `property` is not allowed in a return type annotation
- mypy/typeshed/stdlib/sqlite3/__init__.pyi:293:31 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ mypy/typeshed/stdlib/sqlite3/__init__.pyi:293:31 error[invalid-type-form] Variable of type `property` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:410:20 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:410:20 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:411:31 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:411:31 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:466:28 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:466:28 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:548:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:548:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:550:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:550:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:719:26 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:719:26 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:724:22 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:724:22 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:737:65 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:737:65 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:740:61 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:740:61 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:743:42 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:743:42 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:743:50 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:743:50 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:744:67 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:744:67 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:746:69 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:746:69 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:748:68 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:748:68 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:749:69 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:749:69 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:763:54 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:763:54 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:764:55 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:764:55 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:767:62 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:767:62 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:785:24 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:785:24 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:785:38 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:785:38 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:787:24 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:787:24 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:798:32 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:798:32 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:803:38 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:803:38 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:805:54 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:805:54 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:806:32 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:806:32 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:814:63 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:814:63 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:838:48 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:838:48 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:840:43 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:840:43 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:840:80 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:840:80 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:850:16 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in type expression
+ mypy/typeshed/stdlib/typing.pyi:850:16 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in a type expression
- mypy/typeshed/stdlib/typing.pyi:877:39 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:877:39 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:881:47 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:881:47 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:907:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:907:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:966:14 error[invalid-type-form] Variable of type `object` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:966:14 error[invalid-type-form] Variable of type `object` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing.pyi:985:38 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing.pyi:985:38 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing.pyi:1012:14 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in type expression
+ mypy/typeshed/stdlib/typing.pyi:1012:14 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in a type expression
- mypy/typeshed/stdlib/typing.pyi:1035:16 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in type expression
+ mypy/typeshed/stdlib/typing.pyi:1035:16 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in a type expression
- mypy/typeshed/stdlib/typing.pyi:1036:24 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in type expression
+ mypy/typeshed/stdlib/typing.pyi:1036:24 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in a type expression
- mypy/typeshed/stdlib/typing_extensions.pyi:250:25 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing_extensions.pyi:250:25 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing_extensions.pyi:256:29 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing_extensions.pyi:256:29 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing_extensions.pyi:371:52 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing_extensions.pyi:371:52 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a return type annotation
- mypy/typeshed/stdlib/typing_extensions.pyi:499:37 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ mypy/typeshed/stdlib/typing_extensions.pyi:499:37 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- mypy/typeshed/stdlib/typing_extensions.pyi:647:17 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in type expression
+ mypy/typeshed/stdlib/typing_extensions.pyi:647:17 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in a parameter annotation
- mypy/typeshed/stdlib/typing_extensions.pyi:686:17 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in type expression
+ mypy/typeshed/stdlib/typing_extensions.pyi:686:17 error[invalid-type-form] Invalid subscript of object of type `_SpecialForm` in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:14:34 error[invalid-type-form] Variable of type `object` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:14:34 error[invalid-type-form] Variable of type `object` is not allowed in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:16:54 error[invalid-type-form] Variable of type `object` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:16:54 error[invalid-type-form] Variable of type `object` is not allowed in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:17:37 error[invalid-type-form] Variable of type `object` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:17:37 error[invalid-type-form] Variable of type `object` is not allowed in a return type annotation
- mypyc/test-data/fixtures/typing-full.pyi:69:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:69:27 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypyc/test-data/fixtures/typing-full.pyi:113:50 error[invalid-type-form] Variable of type `object` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:113:50 error[invalid-type-form] Variable of type `object` is not allowed in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:131:30 error[invalid-type-form] Variable of type `object` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:131:30 error[invalid-type-form] Variable of type `object` is not allowed in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:137:28 error[invalid-type-form] Invalid subscript of object of type `Literal[0]` in type expression
+ mypyc/test-data/fixtures/typing-full.pyi:137:28 error[invalid-type-form] Invalid subscript of object of type `Literal[0]` in a return type annotation
- mypyc/test-data/fixtures/typing-full.pyi:154:34 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:154:34 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a return type annotation
- mypyc/test-data/fixtures/typing-full.pyi:173:22 error[invalid-type-form] Variable of type `Literal[0]` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:173:22 error[invalid-type-form] Variable of type `Literal[0]` is not allowed in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:173:41 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:173:41 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
- mypyc/test-data/fixtures/typing-full.pyi:174:22 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a type expression
+ mypyc/test-data/fixtures/typing-full.pyi:174:22 error[invalid-type-form] Variable of type `TypeVar` is not allowed in a parameter annotation
nionutils (https://github.com/nion-software/nionutils)
- nion/utils/Geometry.py:690:37 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ nion/utils/Geometry.py:690:37 error[invalid-type-form] Variable of type `property` is not allowed in a return type annotation
pandas (https://github.com/pandas-dev/pandas)
- pandas/core/_numba/extensions.py:74:48 error[invalid-type-form] Function `any` is not valid in a type expression
+ pandas/core/_numba/extensions.py:74:48 error[invalid-type-form] Function `any` is not valid in a parameter annotation
- pandas/core/arrays/datetimes.py:632:21 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ pandas/core/arrays/datetimes.py:632:21 error[invalid-type-form] Variable of type `property` is not allowed in a return type annotation
- pandas/core/series.py:1507:17 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:1507:17 error[invalid-type-form] Variable of type `Accessor` is not allowed in a parameter annotation
- pandas/core/series.py:1508:23 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:1508:23 error[invalid-type-form] Variable of type `Accessor` is not allowed in a parameter annotation
- pandas/core/series.py:1516:10 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:1516:10 error[invalid-type-form] Variable of type `Accessor` is not allowed in a return type annotation
- pandas/core/series.py:1539:37 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:1539:37 error[invalid-type-form] Variable of type `Accessor` is not allowed in a parameter annotation
- pandas/core/series.py:1674:10 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:1674:10 error[invalid-type-form] Variable of type `Accessor` is not allowed in a return type annotation
- pandas/core/series.py:6003:30 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:6003:30 error[invalid-type-form] Variable of type `Accessor` is not allowed in a parameter annotation
- pandas/core/series.py:6917:19 error[invalid-type-form] Invalid subscript of object of type `Accessor` in type expression
+ pandas/core/series.py:6917:19 error[invalid-type-form] Invalid subscript of object of type `Accessor` in a type expression
- pandas/core/series.py:8642:15 error[invalid-type-form] Variable of type `Accessor` is not allowed in a type expression
+ pandas/core/series.py:8642:15 error[invalid-type-form] Variable of type `Accessor` is not allowed in a parameter annotation
pandera (https://github.com/pandera-dev/pandera)
- pandera/backends/pyspark/checks.py:59:49 error[invalid-type-form] Function `is_table` is not valid in a type expression
+ pandera/backends/pyspark/checks.py:59:49 error[invalid-type-form] Function `is_table` is not valid in a parameter annotation
- pandera/backends/pyspark/checks.py:75:23 error[invalid-type-form] Function `is_bool` is not valid in a type expression
+ pandera/backends/pyspark/checks.py:75:23 error[invalid-type-form] Function `is_bool` is not valid in a parameter annotation
pip (https://github.com/pypa/pip)
- src/pip/_vendor/truststore/_macos.py:314:42 error[invalid-type-form] Variable of type `type[_Pointer[c_void_p]]` is not allowed in a type expression
+ src/pip/_vendor/truststore/_macos.py:314:42 error[invalid-type-form] Variable of type `type[_Pointer[c_void_p]]` is not allowed in a parameter annotation
poetry (https://github.com/python-poetry/poetry)
- src/poetry/utils/env/env_manager.py:257:48 error[invalid-type-form] Invalid subscript of object of type `def list(self, name: str | None = None) -> Unknown` in type expression
+ src/poetry/utils/env/env_manager.py:257:48 error[invalid-type-form] Invalid subscript of object of type `def list(self, name: str | None = None) -> Unknown` in a return type annotation
- tests/repositories/fixtures/pypi.org/generate.py:111:35 error[invalid-type-form] Invalid subscript of object of type `def list(self, location: Path | None = None) -> Iterator[ReleaseFileMetadata]` in type expression
+ tests/repositories/fixtures/pypi.org/generate.py:111:35 error[invalid-type-form] Invalid subscript of object of type `def list(self, location: Path | None = None) -> Iterator[ReleaseFileMetadata]` in a parameter annotation
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-snowflake/prefect_snowflake/experimental/workers/spcs.py:746:76 error[invalid-type-form] Module `datetime` is not valid in a type expression: Did you mean to use the module's member `datetime.datetime`?
+ src/integrations/prefect-snowflake/prefect_snowflake/experimental/workers/spcs.py:746:76 error[invalid-type-form] Module `datetime` is not valid in a return type annotation: Did you mean to use the module's member `datetime.datetime`?
pydantic (https://github.com/pydantic/pydantic)
- pydantic/main.py:288:39 error[invalid-type-form] Invalid subscript of object of type `def dict(self, *, include: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, exclude: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) -> dict[str, Any]` in type expression
+ pydantic/main.py:288:39 error[invalid-type-form] Invalid subscript of object of type `def dict(self, *, include: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, exclude: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) -> dict[str, Any]` in a return type annotation
- pydantic/main.py:570:10 error[invalid-type-form] Invalid subscript of object of type `def dict(self, *, include: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, exclude: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) -> dict[str, Any]` in type expression
+ pydantic/main.py:570:10 error[invalid-type-form] Invalid subscript of object of type `def dict(self, *, include: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, exclude: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) -> dict[str, Any]` in a return type annotation
- pydantic/main.py:1145:31 error[invalid-type-form] Invalid subscript of object of type `def dict(self, *, include: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, exclude: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) -> dict[str, Any]` in type expression
+ pydantic/main.py:1145:31 error[invalid-type-form] Invalid subscript of object of type `def dict(self, *, include: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, exclude: set[int] | set[str] | Mapping[int, Divergent] | Mapping[str, Divergent] | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) -> dict[str, Any]` in a return type annotation
pytest (https://github.com/pytest-dev/pytest)
- src/_pytest/_code/code.py:507:24 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ src/_pytest/_code/code.py:507:24 error[invalid-type-form] Invalid subscript of object of type `property` in a parameter annotation
- src/_pytest/_code/code.py:596:23 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ src/_pytest/_code/code.py:596:23 error[invalid-type-form] Invalid subscript of object of type `property` in a return type annotation
- src/_pytest/pytester.py:1578:36 error[invalid-type-form] Function `str` is not valid in a type expression
+ src/_pytest/pytester.py:1578:36 error[invalid-type-form] Function `str` is not valid in a parameter annotation
- src/_pytest/pytester.py:1597:53 error[invalid-type-form] Function `str` is not valid in a type expression
+ src/_pytest/pytester.py:1597:53 error[invalid-type-form] Function `str` is not valid in a parameter annotation
- src/_pytest/pytester.py:1602:54 error[invalid-type-form] Function `str` is not valid in a type expression
+ src/_pytest/pytester.py:1602:54 error[invalid-type-form] Function `str` is not valid in a parameter annotation
- src/_pytest/pytester.py:1636:28 error[invalid-type-form] Function `str` is not valid in a type expression
+ src/_pytest/pytester.py:1636:28 error[invalid-type-form] Function `str` is not valid in a return type annotation
- src/_pytest/pytester.py:1640:32 error[invalid-type-form] Function `str` is not valid in a type expression
+ src/_pytest/pytester.py:1640:32 error[invalid-type-form] Function `str` is not valid in a parameter annotation
- src/_pytest/pytester.py:1678:31 error[invalid-type-form] Function `str` is not valid in a type expression
+ src/_pytest/pytester.py:1678:31 error[invalid-type-form] Function `str` is not valid in a parameter annotation
rotki (https://github.com/rotki/rotki)
- rotkehlchen/chain/accounts.py:51:61 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ rotkehlchen/chain/accounts.py:51:61 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
- rotkehlchen/types.py:1028:48 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a type expression
+ rotkehlchen/types.py:1028:48 error[invalid-type-form] Variable of type `_SpecialForm` is not allowed in a parameter annotation
schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/schemas.py:746:82 error[invalid-type-form] Function `Case` is not valid in a type expression
+ src/schemathesis/schemas.py:746:82 error[invalid-type-form] Function `Case` is not valid in a return type annotation
scrapy (https://github.com/scrapy/scrapy)
- scrapy/spiderloader.py:127:23 error[invalid-type-form] Invalid subscript of object of type `def list(self) -> Unknown` in type expression
+ scrapy/spiderloader.py:127:23 error[invalid-type-form] Invalid subscript of object of type `def list(self) -> Unknown` in a return type annotation
strawberry (https://github.com/strawberry-graphql/strawberry)
- strawberry/types/arguments.py:124:40 error[invalid-type-form] Variable of type `property` is not allowed in a type expression
+ strawberry/types/arguments.py:124:40 error[invalid-type-form] Variable of type `property` is not allowed in a return type annotation
sympy (https://github.com/sympy/sympy)
- sympy/external/gmpy.py:351:67 error[invalid-type-form] Function `str` is not valid in a type expression
+ sympy/external/gmpy.py:351:67 error[invalid-type-form] Function `str` is not valid in a return type annotation
- sympy/polys/rings.py:1363:44 error[invalid-type-form] Function `str` is not valid in a type expression
+ sympy/polys/rings.py:1363:44 error[invalid-type-form] Function `str` is not valid in a parameter annotation
- sympy/polys/rings.py:1821:47 error[invalid-type-form] Function `str` is not valid in a type expression
+ sympy/polys/rings.py:1821:47 error[invalid-type-form] Function `str` is not valid in a parameter annotation
trio (https://github.com/python-trio/trio)
- src/trio/_socket.py:625:19 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ src/trio/_socket.py:625:19 error[invalid-type-form] Invalid subscript of object of type `property` in a parameter annotation
- src/trio/testing/_raises_group.py:50:21 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ src/trio/testing/_raises_group.py:50:21 error[invalid-type-form] Invalid subscript of object of type `property` in a type expression
- src/trio/testing/_raises_group.py:60:25 error[invalid-type-form] Invalid subscript of object of type `property` in type expression
+ src/trio/testing/_raises_group.py:60:25 error[invalid-type-form] Invalid subscript of object of type `property` in a parameter annotation
xarray (https://github.com/pydata/xarray)
- xarray/core/dataarray.py:1990:46 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:1990:46 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:3567:15 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:3567:15 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4065:16 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4065:16 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4098:16 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4098:16 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4100:45 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4100:45 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4131:45 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4131:45 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4259:39 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4259:39 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4275:41 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4275:41 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4295:36 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4295:36 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:4949:55 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:4949:55 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a return type annotation
- xarray/core/dataarray.py:6315:14 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:6315:14 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:6519:25 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:6519:25 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:6890:14 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:6890:14 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation
- xarray/core/dataarray.py:7272:14 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a type expression
+ xarray/core/dataarray.py:7272:14 error[invalid-type-form] Variable of type `UncachedAccessor[StringAccessor[DataArray]]` is not allowed in a parameter annotation| let ty = self.infer_attribute_expression(attribute_expression); | ||
|
|
||
| if let Type::TypeVar(tvar) = ty | ||
| && tvar.paramspec_attr(self.db()).is_some() |
There was a problem hiding this comment.
Can you explain this piece? Since it looks like a behavior change, but I'm guessing it's not?
There was a problem hiding this comment.
This is a pre-existing special-case that already exists in annotation_expression.rs:
and now has to be copied over to type_expression.rs, because of the fact that we call infer_type_expression() directly from more places.
The repeated logic is a bit ugly, though (as is the special case to begin with). I'll see if I can factor it out.
8c3251f to
246831b
Compare
…urn-type annotations
4dd20b4 to
82efcdd
Compare
82efcdd to
0bf4a84
Compare
Summary
Currently we call
infer_annotation_expressionon return annotations and parameter annotations, and then after that we do some ad-hoc checks to make sure that theTypeAndQualifiersreturned doesn't actually have any qualifiers in it. A simpler way of checking that an annotation expression doesn't contain type qualifiers is by simply callinginfer_type_expressionrather thaninfer_annotation_expression, since type qualifiers are always banned in type expressions -- they're only valid in annotation expressions.A naive way of doing this would regress our error messages -- rather than saying "Type qualifiers are not valid in parameter annotations", we would end up with the vaguer and more jargon-y "Type qualifiers are not valid in type expressions" error message. That's easily fixed, however, by plumbing some more context through our existing
InferenceFlagsbitflag. Doing this allows us to improve many of our existing error messages as well.Test Plan
mdtests updated