microsoft / pyright

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

Improved handling of special forms, including TypeAliasType instances… #8291

Closed erictraut closed 2 weeks ago

erictraut commented 2 weeks ago

…, when used in value expressions. This addresses #8185.

github-actions[bot] commented 2 weeks ago

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

koda-validate (https://github.com/keithasaurus/koda-validate)
+   /tmp/mypy_primer/projects/koda-validate/tests/test_cache.py:26:53 - error: "__getitem__" method not defined on type "UnionType" (reportIndexIssue)
+   /tmp/mypy_primer/projects/koda-validate/tests/test_cache.py:80:60 - error: "__getitem__" method not defined on type "UnionType" (reportIndexIssue)
- 136 errors, 2 warnings, 0 informations 
+ 138 errors, 2 warnings, 0 informations 

mitmproxy (https://github.com/mitmproxy/mitmproxy)
-   /tmp/mypy_primer/projects/mitmproxy/test/mitmproxy/proxy/tutils.py:397:32 - error: Expression of type "Any" cannot be assigned to parameter of type "type[T@Placeholder]" (reportArgumentType)
+   /tmp/mypy_primer/projects/mitmproxy/test/mitmproxy/proxy/tutils.py:397:32 - error: Expression of type "type[Any]" cannot be assigned to parameter of type "type[T@Placeholder]" (reportArgumentType)

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
-     Type of "testdata_dtype" is "list[tuple[type[Labeled[Any]] | type[Collection[Any]] | Any, None] | tuple[type[Labeled[Any]] | type[Collection[None]] | type[None], None] | tuple[type[Labeled[Any]] | type[Collection[int]] | type[int], Unknown] | tuple[type[Labeled[Any]] | type[Collection[Literal['i8']]] | type[str], Unknown] | tuple[type[Labeled[Any]] | type[Collection[float]] | type[float], Unknown] | tuple[UnionType, Unknown]]" (reportUnknownVariableType)
+     Type of "testdata_dtype" is "list[tuple[Any, None] | tuple[Any, Unknown] | tuple[type[Labeled[Any]] | type[Collection[float]] | type[float], Unknown] | tuple[UnionType, Unknown]]" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/xarray-dataclasses/tests/test_typing.py:57:6 - error: Expected one type argument and one or more annotations for "Annotated"
+   /tmp/mypy_primer/projects/xarray-dataclasses/tests/test_typing.py:60:6 - error: Expected one type argument and one or more annotations for "Annotated"
+   /tmp/mypy_primer/projects/xarray-dataclasses/tests/test_typing.py:75:6 - error: Expected one type argument and one or more annotations for "Annotated"
+   /tmp/mypy_primer/projects/xarray-dataclasses/tests/test_typing.py:78:6 - error: Expected one type argument and one or more annotations for "Annotated"
- 55 errors, 158 warnings, 0 informations 
+ 59 errors, 158 warnings, 0 informations 

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3220:13 - error: Argument of type "list[tuple[str, Any | type[Any], Any | Field[Any]]]" cannot be assigned to parameter "iterable" of type "Iterable[Tuple[str, type] | Tuple[str, type, Any]]" in function "extend" (reportArgumentType)
- 180 errors, 15 warnings, 183 informations 
+ 181 errors, 15 warnings, 183 informations 

mypy (https://github.com/python/mypy)
+   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/tkinter/ttk.pyi:49:56 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
- 1740 errors, 108 warnings, 0 informations 
+ 1741 errors, 108 warnings, 0 informations 

bokeh (https://github.com/bokeh/bokeh)
-   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/formatters.py:667:29 - error: Argument of type "LocationType" cannot be assigned to parameter "enum" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/formatters.py:667:29 - error: Argument of type "UnionType" cannot be assigned to parameter "enum" of type "str" in function "__init__"
-   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/nodes.py:181:52 - error: Argument of type "ImplicitTarget" cannot be assigned to parameter "enum" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/nodes.py:181:52 - error: Argument of type "UnionType" cannot be assigned to parameter "enum" of type "str" in function "__init__"

paasta (https://github.com/yelp/paasta)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/frameworks/native_service_config.py:68:24 - error: Argument of type "dict[str, type[List[dict[str, Any]]] | type[Any] | type[bool] | type[str] | type[List[str]]]" cannot be assigned to parameter "fields" of type "dict[str, type[Any]]" in function "TypedDict" (reportArgumentType)
- 1221 errors, 124 warnings, 0 informations 
+ 1222 errors, 124 warnings, 0 informations 

prefect (https://github.com/PrefectHQ/prefect)
-   /tmp/mypy_primer/projects/prefect/src/prefect/settings.py:556:5 - error: Argument of type "Any" cannot be assigned to parameter "type" of type "type[T@Setting]" in function "__init__" (reportArgumentType)
+   /tmp/mypy_primer/projects/prefect/src/prefect/settings.py:556:5 - error: Argument of type "type[Any]" cannot be assigned to parameter "type" of type "type[T@Setting]" in function "__init__" (reportArgumentType)

ibis (https://github.com/ibis-project/ibis)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/pandas/executor.py:257:16 - error: Argument of type "type[Reduction]" cannot be assigned to parameter "key" of type "type[Min] | type[Max] | type[Sum] | type[Mean] | type[Count] | type[Mode] | type[Any] | type[All] | type[Median] | type[ApproxMedian] | type[BitAnd] | type[BitOr] | type[BitXor] | type[Last] | type[First] | type[Arbitrary] | type[CountDistinct] | type[ApproxCountDistinct] | type[ArrayCollect]" in function "__getitem__"
+     Type "type[Reduction]" is incompatible with type "type[Min] | type[Max] | type[Sum] | type[Mean] | type[Count] | type[Mode] | type[Any] | type[All] | type[Median] | type[ApproxMedian] | type[BitAnd] | type[BitOr] | type[BitXor] | type[Last] | type[First] | type[Arbitrary] | type[CountDistinct] | type[ApproxCountDistinct] | type[ArrayCollect]"
+       "type[Reduction]" is incompatible with "type[Min]"
+       Type "type[Reduction]" is incompatible with type "type[Min]"
+       "type[Reduction]" is incompatible with "type[Max]"
+       Type "type[Reduction]" is incompatible with type "type[Max]"
+       "type[Reduction]" is incompatible with "type[Sum]"
+       Type "type[Reduction]" is incompatible with type "type[Sum]"
+       "type[Reduction]" is incompatible with "type[Mean]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:748:5 - error: Expression of type "type[All] | Any | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with declared type "(...) -> NoReturn"
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:748:5 - error: Expression of type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with declared type "(op: Unknown, **kw: Unknown) -> Any"
+     Type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+       Type "((where: Value[Boolean, Any] | None = None, arg: Column[Boolean]) -> All) | ((*args: Any, **kwargs: Any) -> All)" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+         Type "(where: Value[Boolean, Any] | None = None, arg: Column[Boolean]) -> All" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+           Parameter name mismatch: "op" versus "where"
+           Parameter "**kw" has no corresponding parameter (reportAssignmentType)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:750:6 - error: No overloads for "register" match the provided arguments (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:750:25 - error: Argument of type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" cannot be assigned to parameter "cls" of type "(...) -> NoReturn" in function "register"
-     Type "type[All] | Any | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(...) -> NoReturn"
+     Type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(...) -> NoReturn"
-             Type "All" is incompatible with type "NoReturn" (reportAssignmentType)
+             Type "All" is incompatible with type "NoReturn" (reportArgumentType)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/sql/compiler.py:444:37 - error: Argument of type "type[Abs] | type[Acos] | type[All] | type[Any] | type[ApproxCountDistinct] | type[ArgMax] | type[ArgMin] | type[ArrayCollect] | type[ArrayContains] | type[ArrayFlatten] | type[ArrayLength] | type[ArraySort] | type[ArrayStringJoin] | type[Asin] | type[Atan2] | type[Atan] | type[Cos] | type[Cot] | type[Count] | type[CumeDist] | type[Date] | type[DateFromYMD] | type[Degrees] | type[DenseRank] | type[Exp] | type[First] | type[FirstValue] | type[GroupConcat] | type[IfElse] | type[IsInf] | type[IsNan] | type[JSONGetItem] | type[LPad] | type[Last] | type[LastValue] | type[Levenshtein] | type[Ln] | type[Log10] | type[Log2] | type[Lowercase] | type[Map] | type[Median] | type[MinRank] | type[NTile] | type[NthValue] | type[NullIf] | type[PercentRank] | type[Pi] | type[Power] | type[RPad] | type[Radians] | type[RegexSearch] | type[RegexSplit] | type[Repeat] | type[Reverse] | type[RowNumber] | type[Sign] | type[Sin] | type[Sqrt] | type[StartsWith] | type[StrRight] | type[StringAscii] | type[StringContains] | type[StringLength]" cannot be assigned to parameter "op" of type "type" in function "methodname"
+     Type "type[Abs] | type[Acos] | type[All] | type[Any] | type[ApproxCountDistinct] | type[ArgMax] | type[ArgMin] | type[ArrayCollect] | type[ArrayContains] | type[ArrayFlatten] | type[ArrayLength] | type[ArraySort] | type[ArrayStringJoin] | type[Asin] | type[Atan2] | type[Atan] | type[Cos] | type[Cot] | type[Count] | type[CumeDist] | type[Date] | type[DateFromYMD] | type[Degrees] | type[DenseRank] | type[Exp] | type[First] | type[FirstValue] | type[GroupConcat] | type[IfElse] | type[IsInf] | type[IsNan] | type[JSONGetItem] | type[LPad] | type[Last] | type[LastValue] | type[Levenshtein] | type[Ln] | type[Log10] | type[Log2] | type[Lowercase] | type[Map] | type[Median] | type[MinRank] | type[NTile] | type[NthValue] | type[NullIf] | type[PercentRank] | type[Pi] | type[Power] | type[RPad] | type[Radians] | type[RegexSearch] | type[RegexSplit] | type[Repeat] | type[Reverse] | type[RowNumber] | type[Sign] | type[Sin] | type[Sqrt] | type[StartsWith] | type[StrRight] | type[StringAscii] | type[StringContains] | type[StringLength]" is incompatible with type "type" (reportArgumentType)
-   /tmp/mypy_primer/projects/ibis/ibis/expr/types/logical.py:350:18 - error: Object of type "type[Any]" is not callable (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/expr/types/logical.py:350:18 - error: "Any" cannot be instantiated (reportCallIssue)
-   /tmp/mypy_primer/projects/ibis/ibis/tests/expr/test_window_frames.py:535:18 - error: Object of type "type[Any]" is not callable (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/tests/expr/test_window_frames.py:535:18 - error: "Any" cannot be instantiated (reportCallIssue)
- 8538 errors, 119 warnings, 0 informations 
+ 8542 errors, 119 warnings, 0 informations 

jax (https://github.com/google/jax)
-   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/mlir.py:708:18 - error: Expression of type "Any" is incompatible with declared type "type[LoweringRule]"
+   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/mlir.py:708:18 - error: Expression of type "type[Any]" is incompatible with declared type "type[LoweringRule]"
-   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/xla.py:267:21 - error: Expression of type "Any" is incompatible with declared type "type[TranslationRule]"
+   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/xla.py:267:21 - error: Expression of type "type[Any]" is incompatible with declared type "type[TranslationRule]"

steam.py (https://github.com/Gobot1234/steam.py)
-   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:510:33 - error: Expression of type "Any" is incompatible with declared type "type[T@Greedy]" (reportAssignmentType)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:510:33 - error: Expression of type "type[Any]" is incompatible with declared type "type[T@Greedy]" (reportAssignmentType)

streamlit (https://github.com/streamlit/streamlit)
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/type_util.py:98:5 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/commands/page_config.py:46:30 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/commands/page_config.py:46:40 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/commands/page_config.py:46:53 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/image.py:60:40 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
- 3365 errors, 142 warnings, 0 informations 
+ 3370 errors, 142 warnings, 0 informations 

discord.py (https://github.com/Rapptz/discord.py)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/hybrid.py:206:34 - error: Second argument to "isinstance" must be a class or tuple of classes (reportArgumentType)
- 100 errors, 81 warnings, 0 informations 
+ 101 errors, 81 warnings, 0 informations 
github-actions[bot] commented 2 weeks ago

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

Tanjun (https://github.com/FasterSpeeding/Tanjun)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/injecting.py:75:6 - error: TypeVar "_CallbackSigT" appears only once in generic function signature
-     Use "Unknown" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/context/slash.py:980:53 - error: Type variable "_T" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/context/slash.py:981:12 - error: TypeVar "_OtherT" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/dependencies/data.py:278:78 - error: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/dependencies/data.py:310:6 - error: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
- 2419 errors, 6689 warnings, 0 informations 
+ 2414 errors, 6689 warnings, 0 informations 

koda-validate (https://github.com/keithasaurus/koda-validate)
-   /tmp/mypy_primer/projects/koda-validate/koda_validate/coerce.py:26:52 - warning: TypeVar "A" appears only once in generic function signature
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/dictionary.py:69:72 - warning: TypeVar "A" appears only once in generic function signature
+     Use "object" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/dictionary.py:76:60 - warning: TypeVar "A" appears only once in generic function signature
+     Use "object" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/maybe.py:25:78 - warning: TypeVar "A" appears only once in generic function signature
+     Use "object" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/maybe.py:37:66 - warning: TypeVar "A" appears only once in generic function signature
- 136 errors, 2 warnings, 0 informations 
+ 136 errors, 5 warnings, 0 informations 

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
-     Type of "testdata_dtype" is "list[tuple[type[Labeled[Any]] | type[Collection[Any]] | Any, None] | tuple[type[Labeled[Any]] | type[Collection[None]] | type[None], None] | tuple[type[Labeled[Any]] | type[Collection[int]] | type[int], Unknown] | tuple[type[Labeled[Any]] | type[Collection[Literal['i8']]] | type[str], Unknown] | tuple[type[Labeled[Any]] | type[Collection[float]] | type[float], Unknown] | tuple[UnionType, Unknown]]" (reportUnknownVariableType)
+     Type of "testdata_dtype" is "list[tuple[type[Annotated], None] | tuple[type[Annotated], Unknown]]" (reportUnknownVariableType)

mitmproxy (https://github.com/mitmproxy/mitmproxy)
-   /tmp/mypy_primer/projects/mitmproxy/test/mitmproxy/proxy/tutils.py:397:32 - error: Expression of type "Any" cannot be assigned to parameter of type "type[T@Placeholder]" (reportArgumentType)
+   /tmp/mypy_primer/projects/mitmproxy/test/mitmproxy/proxy/tutils.py:397:32 - error: Expression of type "type[Any]" cannot be assigned to parameter of type "type[T@Placeholder]" (reportArgumentType)

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3220:13 - error: Argument of type "list[tuple[str, Any | type[Any], Any | Field[Any]]]" cannot be assigned to parameter "iterable" of type "Iterable[Tuple[str, type] | Tuple[str, type, Any]]" in function "extend" (reportArgumentType)
- 180 errors, 15 warnings, 183 informations 
+ 181 errors, 15 warnings, 183 informations 

xarray (https://github.com/pydata/xarray)
-   /tmp/mypy_primer/projects/xarray/xarray/namedarray/_typing.py:159:32 - warning: TypeVar "_DType" appears only once in generic function signature
-   /tmp/mypy_primer/projects/xarray/xarray/namedarray/_typing.py:162:22 - warning: TypeVar "_DType" appears only once in generic function signature
+   /tmp/mypy_primer/projects/xarray/xarray/namedarray/daskmanager.py:83:32 - warning: TypeVar "_DType_co" appears only once in generic function signature
-   /tmp/mypy_primer/projects/xarray/xarray/namedarray/daskmanager.py:207:16 - warning: TypeVar "_DType_co" appears only once in generic function signature
+   /tmp/mypy_primer/projects/xarray/xarray/namedarray/parallelcompat.py:43:32 - warning: TypeVar "_DType_co" appears only once in generic function signature
+   /tmp/mypy_primer/projects/xarray/xarray/namedarray/parallelcompat.py:342:32 - warning: TypeVar "_DType_co" appears only once in generic function signature

mypy (https://github.com/python/mypy)
+   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/tkinter/ttk.pyi:49:56 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:134:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:40 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:46 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:65 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 1740 errors, 108 warnings, 0 informations 
+ 1746 errors, 108 warnings, 0 informations 

bokeh (https://github.com/bokeh/bokeh)
-   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/formatters.py:667:29 - error: Argument of type "LocationType" cannot be assigned to parameter "enum" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/formatters.py:667:29 - error: Argument of type "UnionType" cannot be assigned to parameter "enum" of type "str" in function "__init__"
-   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/nodes.py:181:52 - error: Argument of type "ImplicitTarget" cannot be assigned to parameter "enum" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/nodes.py:181:52 - error: Argument of type "UnionType" cannot be assigned to parameter "enum" of type "str" in function "__init__"

paasta (https://github.com/yelp/paasta)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/frameworks/native_service_config.py:68:24 - error: Argument of type "dict[str, type[List[dict[str, Any]]] | type[Any] | type[bool] | type[str] | type[List[str]]]" cannot be assigned to parameter "fields" of type "dict[str, type[Any]]" in function "TypedDict" (reportArgumentType)
- 1217 errors, 124 warnings, 0 informations 
+ 1218 errors, 124 warnings, 0 informations 

prefect (https://github.com/PrefectHQ/prefect)
-   /tmp/mypy_primer/projects/prefect/src/prefect/settings.py:556:5 - error: Argument of type "Any" cannot be assigned to parameter "type" of type "type[T@Setting]" in function "__init__" (reportArgumentType)
+   /tmp/mypy_primer/projects/prefect/src/prefect/settings.py:556:5 - error: Argument of type "type[Any]" cannot be assigned to parameter "type" of type "type[T@Setting]" in function "__init__" (reportArgumentType)

jax (https://github.com/google/jax)
-   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/mlir.py:708:18 - error: Expression of type "Any" is incompatible with declared type "type[LoweringRule]"
+   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/mlir.py:708:18 - error: Expression of type "type[Any]" is incompatible with declared type "type[LoweringRule]"
-   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/xla.py:267:21 - error: Expression of type "Any" is incompatible with declared type "type[TranslationRule]"
+   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/xla.py:267:21 - error: Expression of type "type[Any]" is incompatible with declared type "type[TranslationRule]"

ibis (https://github.com/ibis-project/ibis)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/pandas/executor.py:257:16 - error: Argument of type "type[Reduction]" cannot be assigned to parameter "key" of type "type[Min] | type[Max] | type[Sum] | type[Mean] | type[Count] | type[Mode] | type[Any] | type[All] | type[Median] | type[ApproxMedian] | type[BitAnd] | type[BitOr] | type[BitXor] | type[Last] | type[First] | type[Arbitrary] | type[CountDistinct] | type[ApproxCountDistinct] | type[ArrayCollect]" in function "__getitem__"
+     Type "type[Reduction]" is incompatible with type "type[Min] | type[Max] | type[Sum] | type[Mean] | type[Count] | type[Mode] | type[Any] | type[All] | type[Median] | type[ApproxMedian] | type[BitAnd] | type[BitOr] | type[BitXor] | type[Last] | type[First] | type[Arbitrary] | type[CountDistinct] | type[ApproxCountDistinct] | type[ArrayCollect]"
+       "type[Reduction]" is incompatible with "type[Min]"
+       Type "type[Reduction]" is incompatible with type "type[Min]"
+       "type[Reduction]" is incompatible with "type[Max]"
+       Type "type[Reduction]" is incompatible with type "type[Max]"
+       "type[Reduction]" is incompatible with "type[Sum]"
+       Type "type[Reduction]" is incompatible with type "type[Sum]"
+       "type[Reduction]" is incompatible with "type[Mean]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:748:5 - error: Expression of type "type[All] | Any | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with declared type "(...) -> NoReturn"
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:748:5 - error: Expression of type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with declared type "(op: Unknown, **kw: Unknown) -> Any"
+     Type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+       Type "((where: Value[Boolean, Any] | None = None, arg: Column[Boolean]) -> All) | ((*args: Any, **kwargs: Any) -> All)" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+         Type "(where: Value[Boolean, Any] | None = None, arg: Column[Boolean]) -> All" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+           Parameter name mismatch: "op" versus "where"
+           Parameter "**kw" has no corresponding parameter (reportAssignmentType)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:750:6 - error: No overloads for "register" match the provided arguments (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:750:25 - error: Argument of type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" cannot be assigned to parameter "cls" of type "(...) -> NoReturn" in function "register"
-     Type "type[All] | Any | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(...) -> NoReturn"
+     Type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(...) -> NoReturn"
-             Type "All" is incompatible with type "NoReturn" (reportAssignmentType)
+             Type "All" is incompatible with type "NoReturn" (reportArgumentType)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/sql/compiler.py:444:37 - error: Argument of type "type[Abs] | type[Acos] | type[All] | type[Any] | type[ApproxCountDistinct] | type[ArgMax] | type[ArgMin] | type[ArrayCollect] | type[ArrayContains] | type[ArrayFlatten] | type[ArrayLength] | type[ArraySort] | type[ArrayStringJoin] | type[Asin] | type[Atan2] | type[Atan] | type[Cos] | type[Cot] | type[Count] | type[CumeDist] | type[Date] | type[DateFromYMD] | type[Degrees] | type[DenseRank] | type[Exp] | type[First] | type[FirstValue] | type[GroupConcat] | type[IfElse] | type[IsInf] | type[IsNan] | type[JSONGetItem] | type[LPad] | type[Last] | type[LastValue] | type[Levenshtein] | type[Ln] | type[Log10] | type[Log2] | type[Lowercase] | type[Map] | type[Median] | type[MinRank] | type[NTile] | type[NthValue] | type[NullIf] | type[PercentRank] | type[Pi] | type[Power] | type[RPad] | type[Radians] | type[RegexSearch] | type[RegexSplit] | type[Repeat] | type[Reverse] | type[RowNumber] | type[Sign] | type[Sin] | type[Sqrt] | type[StartsWith] | type[StrRight] | type[StringAscii] | type[StringContains] | type[StringLength]" cannot be assigned to parameter "op" of type "type" in function "methodname"
+     Type "type[Abs] | type[Acos] | type[All] | type[Any] | type[ApproxCountDistinct] | type[ArgMax] | type[ArgMin] | type[ArrayCollect] | type[ArrayContains] | type[ArrayFlatten] | type[ArrayLength] | type[ArraySort] | type[ArrayStringJoin] | type[Asin] | type[Atan2] | type[Atan] | type[Cos] | type[Cot] | type[Count] | type[CumeDist] | type[Date] | type[DateFromYMD] | type[Degrees] | type[DenseRank] | type[Exp] | type[First] | type[FirstValue] | type[GroupConcat] | type[IfElse] | type[IsInf] | type[IsNan] | type[JSONGetItem] | type[LPad] | type[Last] | type[LastValue] | type[Levenshtein] | type[Ln] | type[Log10] | type[Log2] | type[Lowercase] | type[Map] | type[Median] | type[MinRank] | type[NTile] | type[NthValue] | type[NullIf] | type[PercentRank] | type[Pi] | type[Power] | type[RPad] | type[Radians] | type[RegexSearch] | type[RegexSplit] | type[Repeat] | type[Reverse] | type[RowNumber] | type[Sign] | type[Sin] | type[Sqrt] | type[StartsWith] | type[StrRight] | type[StringAscii] | type[StringContains] | type[StringLength]" is incompatible with type "type" (reportArgumentType)
-   /tmp/mypy_primer/projects/ibis/ibis/expr/types/logical.py:350:18 - error: Object of type "type[Any]" is not callable (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/expr/types/logical.py:350:18 - error: "Any" cannot be instantiated (reportCallIssue)
-   /tmp/mypy_primer/projects/ibis/ibis/tests/expr/test_window_frames.py:535:18 - error: Object of type "type[Any]" is not callable (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/tests/expr/test_window_frames.py:535:18 - error: "Any" cannot be instantiated (reportCallIssue)
- 8538 errors, 119 warnings, 0 informations 
+ 8542 errors, 119 warnings, 0 informations 

scrapy (https://github.com/scrapy/scrapy)
-   /tmp/mypy_primer/projects/scrapy/scrapy/middleware.py:110:24 - error: Type variable "_T2" has no meaning in this context (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/scrapy/scrapy/middleware.py:110:24 - warning: TypeVar "_T2" appears only once in generic function signature
-   /tmp/mypy_primer/projects/scrapy/scrapy/middleware.py:116:52 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/core/spidermw.py:323:38 - error: Type variable "_T" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/scrapy/scrapy/core/spidermw.py:323:61 - error: Type variable "_T" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:67:27 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:424:51 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:446:77 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/spider.py:51:42 - warning: TypeVar "_T" appears only once in generic function signature
- 2089 errors, 136 warnings, 0 informations 
+ 2086 errors, 132 warnings, 0 informations 

steam.py (https://github.com/Gobot1234/steam.py)
-   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:510:33 - error: Expression of type "Any" is incompatible with declared type "type[T@Greedy]" (reportAssignmentType)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:510:33 - error: Expression of type "type[Any]" is incompatible with declared type "type[T@Greedy]" (reportAssignmentType)

streamlit (https://github.com/streamlit/streamlit)
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/type_util.py:98:5 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/commands/page_config.py:46:30 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/commands/page_config.py:46:40 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/commands/page_config.py:46:53 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/image.py:60:40 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
- 3365 errors, 142 warnings, 0 informations 
+ 3370 errors, 142 warnings, 0 informations 

vision (https://github.com/pytorch/vision)
-   /tmp/mypy_primer/projects/vision/torchvision/prototype/datasets/utils/_internal.py:48:52 - error: Type variable "K" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/vision/torchvision/prototype/datasets/utils/_internal.py:48:55 - error: Type variable "D" has no meaning in this context (reportGeneralTypeIssues)
- 1703 errors, 187 warnings, 0 informations 
+ 1701 errors, 187 warnings, 0 informations 

discord.py (https://github.com/Rapptz/discord.py)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/hybrid.py:206:34 - error: Second argument to "isinstance" must be a class or tuple of classes (reportArgumentType)
- 100 errors, 81 warnings, 0 informations 
+ 101 errors, 81 warnings, 0 informations 

trio (https://github.com/python-trio/trio)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:454:61 - error: TypeVar "E" appears only once in generic function signature
+     Use "BaseException" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:455:56 - error: Type variable "E" has no meaning in this context (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:474:39 - error: TypeVar "E" appears only once in generic function signature
+     Use "BaseException" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:553:44 - error: Type variable "E" has no meaning in this context (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:553:68 - error: Type variable "E" has no meaning in this context (reportGeneralTypeIssues)
- 3753 errors, 53 warnings, 0 informations 
+ 3758 errors, 53 warnings, 0 informations 
github-actions[bot] commented 2 weeks ago

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

Tanjun (https://github.com/FasterSpeeding/Tanjun)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/injecting.py:75:6 - error: TypeVar "_CallbackSigT" appears only once in generic function signature
-     Use "Unknown" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/context/slash.py:980:53 - error: Type variable "_T" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/context/slash.py:981:12 - error: TypeVar "_OtherT" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/dependencies/data.py:278:78 - error: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/Tanjun/tanjun/dependencies/data.py:310:6 - error: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
- 2419 errors, 6689 warnings, 0 informations 
+ 2414 errors, 6689 warnings, 0 informations 

koda-validate (https://github.com/keithasaurus/koda-validate)
-   /tmp/mypy_primer/projects/koda-validate/koda_validate/coerce.py:26:52 - warning: TypeVar "A" appears only once in generic function signature
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/dictionary.py:69:72 - warning: TypeVar "A" appears only once in generic function signature
+     Use "object" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/dictionary.py:76:60 - warning: TypeVar "A" appears only once in generic function signature
+     Use "object" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/maybe.py:25:78 - warning: TypeVar "A" appears only once in generic function signature
+     Use "object" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/maybe.py:37:66 - warning: TypeVar "A" appears only once in generic function signature
- 136 errors, 2 warnings, 0 informations 
+ 136 errors, 5 warnings, 0 informations 

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
-     Type of "testdata_dtype" is "list[tuple[type[Labeled[Any]] | type[Collection[Any]] | Any, None] | tuple[type[Labeled[Any]] | type[Collection[None]] | type[None], None] | tuple[type[Labeled[Any]] | type[Collection[int]] | type[int], Unknown] | tuple[type[Labeled[Any]] | type[Collection[Literal['i8']]] | type[str], Unknown] | tuple[type[Labeled[Any]] | type[Collection[float]] | type[float], Unknown] | tuple[UnionType, Unknown]]" (reportUnknownVariableType)
+     Type of "testdata_dtype" is "list[tuple[type[Annotated], None] | tuple[type[Annotated], Unknown]]" (reportUnknownVariableType)

mitmproxy (https://github.com/mitmproxy/mitmproxy)
-   /tmp/mypy_primer/projects/mitmproxy/test/mitmproxy/proxy/tutils.py:397:32 - error: Expression of type "Any" cannot be assigned to parameter of type "type[T@Placeholder]" (reportArgumentType)
+   /tmp/mypy_primer/projects/mitmproxy/test/mitmproxy/proxy/tutils.py:397:32 - error: Expression of type "type[Any]" cannot be assigned to parameter of type "type[T@Placeholder]" (reportArgumentType)

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3220:13 - error: Argument of type "list[tuple[str, Any | type[Any], Any | Field[Any]]]" cannot be assigned to parameter "iterable" of type "Iterable[Tuple[str, type] | Tuple[str, type, Any]]" in function "extend" (reportArgumentType)
- 180 errors, 15 warnings, 183 informations 
+ 181 errors, 15 warnings, 183 informations 

xarray (https://github.com/pydata/xarray)
-   /tmp/mypy_primer/projects/xarray/xarray/namedarray/_typing.py:159:32 - warning: TypeVar "_DType" appears only once in generic function signature
-   /tmp/mypy_primer/projects/xarray/xarray/namedarray/_typing.py:162:22 - warning: TypeVar "_DType" appears only once in generic function signature
+   /tmp/mypy_primer/projects/xarray/xarray/namedarray/daskmanager.py:83:32 - warning: TypeVar "_DType_co" appears only once in generic function signature
-   /tmp/mypy_primer/projects/xarray/xarray/namedarray/daskmanager.py:207:16 - warning: TypeVar "_DType_co" appears only once in generic function signature
+   /tmp/mypy_primer/projects/xarray/xarray/namedarray/parallelcompat.py:43:32 - warning: TypeVar "_DType_co" appears only once in generic function signature
+   /tmp/mypy_primer/projects/xarray/xarray/namedarray/parallelcompat.py:342:32 - warning: TypeVar "_DType_co" appears only once in generic function signature

mypy (https://github.com/python/mypy)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:134:37 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:40 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:46 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:59 - error: Variable not allowed in type expression (reportInvalidTypeForm)
+   /tmp/mypy_primer/projects/mypy/mypyc/test-data/fixtures/typing-full.pyi:136:65 - error: Variable not allowed in type expression (reportInvalidTypeForm)
- 1740 errors, 108 warnings, 0 informations 
+ 1745 errors, 108 warnings, 0 informations 

bokeh (https://github.com/bokeh/bokeh)
-   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/formatters.py:667:29 - error: Argument of type "LocationType" cannot be assigned to parameter "enum" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/formatters.py:667:29 - error: Argument of type "UnionType" cannot be assigned to parameter "enum" of type "str" in function "__init__"
-   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/nodes.py:181:52 - error: Argument of type "ImplicitTarget" cannot be assigned to parameter "enum" of type "str" in function "__init__"
+   /tmp/mypy_primer/projects/bokeh/src/bokeh/models/nodes.py:181:52 - error: Argument of type "UnionType" cannot be assigned to parameter "enum" of type "str" in function "__init__"

paasta (https://github.com/yelp/paasta)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/frameworks/native_service_config.py:68:24 - error: Argument of type "dict[str, type[List[dict[str, Any]]] | type[Any] | type[bool] | type[str] | type[List[str]]]" cannot be assigned to parameter "fields" of type "dict[str, type[Any]]" in function "TypedDict" (reportArgumentType)
- 1217 errors, 124 warnings, 0 informations 
+ 1218 errors, 124 warnings, 0 informations 

prefect (https://github.com/PrefectHQ/prefect)
-   /tmp/mypy_primer/projects/prefect/src/prefect/settings.py:556:5 - error: Argument of type "Any" cannot be assigned to parameter "type" of type "type[T@Setting]" in function "__init__" (reportArgumentType)
+   /tmp/mypy_primer/projects/prefect/src/prefect/settings.py:556:5 - error: Argument of type "type[Any]" cannot be assigned to parameter "type" of type "type[T@Setting]" in function "__init__" (reportArgumentType)

ibis (https://github.com/ibis-project/ibis)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/pandas/executor.py:257:16 - error: Argument of type "type[Reduction]" cannot be assigned to parameter "key" of type "type[Min] | type[Max] | type[Sum] | type[Mean] | type[Count] | type[Mode] | type[Any] | type[All] | type[Median] | type[ApproxMedian] | type[BitAnd] | type[BitOr] | type[BitXor] | type[Last] | type[First] | type[Arbitrary] | type[CountDistinct] | type[ApproxCountDistinct] | type[ArrayCollect]" in function "__getitem__"
+     Type "type[Reduction]" is incompatible with type "type[Min] | type[Max] | type[Sum] | type[Mean] | type[Count] | type[Mode] | type[Any] | type[All] | type[Median] | type[ApproxMedian] | type[BitAnd] | type[BitOr] | type[BitXor] | type[Last] | type[First] | type[Arbitrary] | type[CountDistinct] | type[ApproxCountDistinct] | type[ArrayCollect]"
+       "type[Reduction]" is incompatible with "type[Min]"
+       Type "type[Reduction]" is incompatible with type "type[Min]"
+       "type[Reduction]" is incompatible with "type[Max]"
+       Type "type[Reduction]" is incompatible with type "type[Max]"
+       "type[Reduction]" is incompatible with "type[Sum]"
+       Type "type[Reduction]" is incompatible with type "type[Sum]"
+       "type[Reduction]" is incompatible with "type[Mean]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:748:5 - error: Expression of type "type[All] | Any | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with declared type "(...) -> NoReturn"
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:748:5 - error: Expression of type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with declared type "(op: Unknown, **kw: Unknown) -> Any"
+     Type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+       Type "((where: Value[Boolean, Any] | None = None, arg: Column[Boolean]) -> All) | ((*args: Any, **kwargs: Any) -> All)" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+         Type "(where: Value[Boolean, Any] | None = None, arg: Column[Boolean]) -> All" is incompatible with type "(op: Unknown, **kw: Unknown) -> Any"
+           Parameter name mismatch: "op" versus "where"
+           Parameter "**kw" has no corresponding parameter (reportAssignmentType)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:750:6 - error: No overloads for "register" match the provided arguments (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/polars/compiler.py:750:25 - error: Argument of type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" cannot be assigned to parameter "cls" of type "(...) -> NoReturn" in function "register"
-     Type "type[All] | Any | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(...) -> NoReturn"
+     Type "type[All] | type[Any] | type[ApproxMedian] | type[Arbitrary] | type[Count] | type[CountDistinct] | type[First] | type[Last] | type[Max] | type[Mean] | type[Median] | type[Min] | type[Mode] | type[StandardDev] | type[Sum] | type[Variance]" is incompatible with type "(...) -> NoReturn"
-             Type "All" is incompatible with type "NoReturn" (reportAssignmentType)
+             Type "All" is incompatible with type "NoReturn" (reportArgumentType)
+   /tmp/mypy_primer/projects/ibis/ibis/backends/sql/compiler.py:444:37 - error: Argument of type "type[Abs] | type[Acos] | type[All] | type[Any] | type[ApproxCountDistinct] | type[ArgMax] | type[ArgMin] | type[ArrayCollect] | type[ArrayContains] | type[ArrayFlatten] | type[ArrayLength] | type[ArraySort] | type[ArrayStringJoin] | type[Asin] | type[Atan2] | type[Atan] | type[Cos] | type[Cot] | type[Count] | type[CumeDist] | type[Date] | type[DateFromYMD] | type[Degrees] | type[DenseRank] | type[Exp] | type[First] | type[FirstValue] | type[GroupConcat] | type[IfElse] | type[IsInf] | type[IsNan] | type[JSONGetItem] | type[LPad] | type[Last] | type[LastValue] | type[Levenshtein] | type[Ln] | type[Log10] | type[Log2] | type[Lowercase] | type[Map] | type[Median] | type[MinRank] | type[NTile] | type[NthValue] | type[NullIf] | type[PercentRank] | type[Pi] | type[Power] | type[RPad] | type[Radians] | type[RegexSearch] | type[RegexSplit] | type[Repeat] | type[Reverse] | type[RowNumber] | type[Sign] | type[Sin] | type[Sqrt] | type[StartsWith] | type[StrRight] | type[StringAscii] | type[StringContains] | type[StringLength]" cannot be assigned to parameter "op" of type "type" in function "methodname"
+     Type "type[Abs] | type[Acos] | type[All] | type[Any] | type[ApproxCountDistinct] | type[ArgMax] | type[ArgMin] | type[ArrayCollect] | type[ArrayContains] | type[ArrayFlatten] | type[ArrayLength] | type[ArraySort] | type[ArrayStringJoin] | type[Asin] | type[Atan2] | type[Atan] | type[Cos] | type[Cot] | type[Count] | type[CumeDist] | type[Date] | type[DateFromYMD] | type[Degrees] | type[DenseRank] | type[Exp] | type[First] | type[FirstValue] | type[GroupConcat] | type[IfElse] | type[IsInf] | type[IsNan] | type[JSONGetItem] | type[LPad] | type[Last] | type[LastValue] | type[Levenshtein] | type[Ln] | type[Log10] | type[Log2] | type[Lowercase] | type[Map] | type[Median] | type[MinRank] | type[NTile] | type[NthValue] | type[NullIf] | type[PercentRank] | type[Pi] | type[Power] | type[RPad] | type[Radians] | type[RegexSearch] | type[RegexSplit] | type[Repeat] | type[Reverse] | type[RowNumber] | type[Sign] | type[Sin] | type[Sqrt] | type[StartsWith] | type[StrRight] | type[StringAscii] | type[StringContains] | type[StringLength]" is incompatible with type "type" (reportArgumentType)
-   /tmp/mypy_primer/projects/ibis/ibis/expr/types/logical.py:350:18 - error: Object of type "type[Any]" is not callable (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/expr/types/logical.py:350:18 - error: "Any" cannot be instantiated (reportCallIssue)
-   /tmp/mypy_primer/projects/ibis/ibis/tests/expr/test_window_frames.py:535:18 - error: Object of type "type[Any]" is not callable (reportCallIssue)
+   /tmp/mypy_primer/projects/ibis/ibis/tests/expr/test_window_frames.py:535:18 - error: "Any" cannot be instantiated (reportCallIssue)
- 8538 errors, 119 warnings, 0 informations 
+ 8542 errors, 119 warnings, 0 informations 

jax (https://github.com/google/jax)
-   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/mlir.py:708:18 - error: Expression of type "Any" is incompatible with declared type "type[LoweringRule]"
+   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/mlir.py:708:18 - error: Expression of type "type[Any]" is incompatible with declared type "type[LoweringRule]"
-   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/xla.py:267:21 - error: Expression of type "Any" is incompatible with declared type "type[TranslationRule]"
+   /tmp/mypy_primer/projects/jax/jax/_src/interpreters/xla.py:267:21 - error: Expression of type "type[Any]" is incompatible with declared type "type[TranslationRule]"

scrapy (https://github.com/scrapy/scrapy)
-   /tmp/mypy_primer/projects/scrapy/scrapy/middleware.py:110:24 - error: Type variable "_T2" has no meaning in this context (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/scrapy/scrapy/middleware.py:110:24 - warning: TypeVar "_T2" appears only once in generic function signature
-   /tmp/mypy_primer/projects/scrapy/scrapy/middleware.py:116:52 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/core/spidermw.py:323:38 - error: Type variable "_T" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/scrapy/scrapy/core/spidermw.py:323:61 - error: Type variable "_T" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:67:27 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:424:51 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:446:77 - warning: TypeVar "_T" appears only once in generic function signature
-     Use "object" instead (reportInvalidTypeVarUse)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/spider.py:51:42 - warning: TypeVar "_T" appears only once in generic function signature
- 2089 errors, 136 warnings, 0 informations 
+ 2086 errors, 132 warnings, 0 informations 

steam.py (https://github.com/Gobot1234/steam.py)
-   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:510:33 - error: Expression of type "Any" is incompatible with declared type "type[T@Greedy]" (reportAssignmentType)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:510:33 - error: Expression of type "type[Any]" is incompatible with declared type "type[T@Greedy]" (reportAssignmentType)

vision (https://github.com/pytorch/vision)
-   /tmp/mypy_primer/projects/vision/torchvision/prototype/datasets/utils/_internal.py:48:52 - error: Type variable "K" has no meaning in this context (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/vision/torchvision/prototype/datasets/utils/_internal.py:48:55 - error: Type variable "D" has no meaning in this context (reportGeneralTypeIssues)
- 1703 errors, 187 warnings, 0 informations 
+ 1701 errors, 187 warnings, 0 informations 

trio (https://github.com/python-trio/trio)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:454:61 - error: TypeVar "E" appears only once in generic function signature
+     Use "BaseException" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:455:56 - error: Type variable "E" has no meaning in this context (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:474:39 - error: TypeVar "E" appears only once in generic function signature
+     Use "BaseException" instead (reportInvalidTypeVarUse)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:553:44 - error: Type variable "E" has no meaning in this context (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/trio/src/trio/testing/_raises_group.py:553:68 - error: Type variable "E" has no meaning in this context (reportGeneralTypeIssues)
- 3753 errors, 53 warnings, 0 informations 
+ 3758 errors, 53 warnings, 0 informations 

discord.py (https://github.com/Rapptz/discord.py)
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/hybrid.py:206:34 - error: Second argument to "isinstance" must be a class or tuple of classes (reportArgumentType)
- 100 errors, 81 warnings, 0 informations 
+ 101 errors, 81 warnings, 0 informations