Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.1.382 #694

Merged
merged 19 commits into from
Sep 25, 2024
Merged

Merge 1.1.382 #694

merged 19 commits into from
Sep 25, 2024

Conversation

DetachHead
Copy link
Owner

No description provided.

erictraut and others added 19 commits September 17, 2024 19:05
… call to `type` is used within a loop. This addresses #9023. (#9024)
…to handle the negative narrowing case where tuple `t` has a minimum length of `L`. In this case, the narrowed type can be computed whereas previously it was left unnarrowed. This addresses #9031. (#9034)
…t, and tuple expressions that include modules in them. This addresses #9036. (#9038)
…ariable in a protocol and a NamedTuple or frozen dataclass as a concrete class. This addresses #9040.
…sinstance check rather than inlining the logic to detect an assert expression. No functional change.
…a union type that includes the same type variable multiple times in at least one invariant context. This change eliminates the concept of a "locked" constraint tracker, which is no longer needed and was the underlying cause of the bug. This addresses #9047. (#9048)
… being reported in the wrong location when a property method has a decorator applied to it. This addresses #9059. (#9060)
…o a type variable in a contravariant context. This addresses #9056. (#9061)
… as `TypeForm` is used as the first argument to `isinstance`. This addresses #9053.
… signature contains a positional-only parameter and a keyword parameter with the same name. This can result from the application of a ParamSpec or through the use of an unpacked TypedDict. This addresses #9043 and #8964. (#9064)
…`is` and `is not` operators. This addresses #9068. (#9070)
…a class has a custom metaclass with a `__call__` method and a `__new__` or `__init__` method that provides a different bidirectional type inference context for parameters. This addresses #9067. (#9071)
Copy link
Contributor

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

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
-   /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/utils.py:294:18 - error: Type of "__name__" is partially unknown
-     Type of "__name__" is "str | Unknown" (reportUnknownMemberType)
- 2259 errors, 0 warnings, 0 notes
+ 2258 errors, 0 warnings, 0 notes

anyio (https://github.com/agronholm/anyio)
-   /tmp/mypy_primer/projects/anyio/src/anyio/_backends/_asyncio.py:960:13 - error: Argument of type "partial[None]" cannot be assigned to parameter "func" of type "(*PosArgsT@run_sync_from_thread) -> T_Retval@run_sync_from_thread" in function "run_sync_from_thread"
-     Type "partial[None]" is not assignable to type "((func: (*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), args: tuple[*PosArgsT@_call_func], kwargs: dict[str, Any], future: Future[T_Retval@_call_func]) -> Coroutine[Any, Any, None], (*PosArgsT@_spawn_task_from_thread) -> (Awaitable[T_Retval@_spawn_task_from_thread] | T_Retval@_spawn_task_from_thread), tuple[*PosArgsT@_spawn_task_from_thread], dict[str, Any], Future[T_Retval@_spawn_task_from_thread]) -> None"
-       Parameter 3: type "tuple[*PosArgsT@_spawn_task_from_thread]" is incompatible with type "*PosArgsT@start_soon"
-         Type "*tuple[tuple[*PosArgsT@_spawn_task_from_thread]]" is not assignable to type "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
-           "*tuple[tuple[*PosArgsT@_spawn_task_from_thread]]" is not assignable to "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
-             Tuple size mismatch; expected 4 but received 1
-       Parameter 4: type "dict[str, Any]" is incompatible with type "*PosArgsT@start_soon"
-         Type "*tuple[dict[str, Any]]" is not assignable to type "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
-           "*tuple[dict[str, Any]]" is not assignable to "*tuple[(*PosArgsT@_call_func) -> (Awaitable[T_Retval@_call_func] | T_Retval@_call_func), tuple[*PosArgsT@_call_func], dict[str, Any], Future[T_Retval@_call_func]]"
-     ... (reportArgumentType)
- 1705 errors, 0 warnings, 0 notes
+ 1704 errors, 0 warnings, 0 notes

pycryptodome (https://github.com/Legrandin/pycryptodome)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py:291:40 - error: Argument of type "ModuleType" cannot be assigned to parameter "hashAlgo" of type "HashLike | None" in function "new"
+     Type "ModuleType" is not assignable to type "HashLike | None"
+       "ModuleType" is incompatible with protocol "HashLikeClass"
+         "digest_size" is not present
+         "new" is not present
+       "ModuleType" is incompatible with protocol "HashLikeModule"
+         "digest_size" is not present
+         "new" is not present
+       "ModuleType" is not assignable to "None" (reportArgumentType)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py:308:40 - error: Argument of type "ModuleType" cannot be assigned to parameter "hashAlgo" of type "HashLike | None" in function "new"
+     Type "ModuleType" is not assignable to type "HashLike | None"
+       "ModuleType" is incompatible with protocol "HashLikeClass"
+         "digest_size" is not present
+         "new" is not present
+       "ModuleType" is incompatible with protocol "HashLikeModule"
+         "digest_size" is not present
+         "new" is not present
+       "ModuleType" is not assignable to "None" (reportArgumentType)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py:342:49 - error: Argument of type "ModuleType" cannot be assigned to parameter "hashAlgo" of type "HashLike | None" in function "new"
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py:342:49 - error: Argument of type "Module("Crypto.Hash.MD2") | Module("Crypto.Hash.MD5") | Module("Crypto.Hash.SHA1") | Module("Crypto.Hash.SHA256") | Module("Crypto.Hash.RIPEMD160")" cannot be assigned to parameter "hashAlgo" of type "HashLike | None" in function "new"
-     Type "Module("Crypto.Hash.MD2") | Module("Crypto.Hash.MD5") | Module("Crypto.Hash.SHA1") | Module("Crypto.Hash.SHA256") | Module("Crypto.Hash.RIPEMD160")" is not assignable to type "HashLike | None"
-       Type "Module("Crypto.Hash.MD2")" is not assignable to type "HashLike | None"
+     Type "ModuleType" is not assignable to type "HashLike | None"
-         "new" is an incompatible type
-           Type "(data: Buffer = ...) -> MD4Hash" is not assignable to type "(data: bytes | None = ...) -> Any"
-             Parameter 1: type "bytes | None" is incompatible with type "Buffer"
-         "new" is an incompatible type
-           Type "(data: Buffer = ...) -> MD4Hash" is not assignable to type "(data: bytes | None = ...) -> Any"
-             Parameter 1: type "bytes | None" is incompatible with type "Buffer"
-     ... (reportArgumentType)
+       "ModuleType" is incompatible with protocol "HashLikeClass"
+         "digest_size" is not present
+         "new" is not present
+       "ModuleType" is incompatible with protocol "HashLikeModule"
+         "digest_size" is not present
+         "new" is not present
+       "ModuleType" is not assignable to "None" (reportArgumentType)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py:345:41 - error: Type of "digest_size" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_CMAC.py:434:9 - error: Argument of type "dict[str, str | ModuleType]" cannot be assigned to parameter "value" of type "str | ModuleType" in function "__setitem__"
+     Type "dict[str, str | ModuleType]" is not assignable to type "str | ModuleType"
+       "dict[str, str | ModuleType]" is not assignable to "str"
+       "dict[str, str | ModuleType]" is not assignable to "ModuleType" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_CMAC.py:434:9 - error: Argument of type "dict[str, str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")]" cannot be assigned to parameter "value" of type "str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")" in function "__setitem__"
-     Type "dict[str, str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")]" is not assignable to type "str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")"
-       "dict[str, str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")]" is not assignable to "str"
-       Type "dict[str, str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")]" is not assignable to type "Module("Crypto.Cipher.AES")"
-       Type "dict[str, str | Module("Crypto.Cipher.AES") | Module("Crypto.Cipher.DES3")]" is not assignable to type "Module("Crypto.Cipher.DES3")" (reportArgumentType)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:328:13 - error: Type of "h" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:328:17 - error: Type of "new" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:329:13 - error: Type of "mac_tag" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:329:23 - error: Type of "digest" is Any (reportAny)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:328:33 - error: Argument of type "str" cannot be assigned to parameter "data" of type "Buffer" in function "new"
-     Type "str" is not assignable to type "Buffer"
-       "str" is not assignable to "bytes"
-       "str" is not assignable to "bytearray"
-       "str" is not assignable to "memoryview[int]" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:328:43 - error: Argument of type "str" cannot be assigned to parameter "key" of type "Buffer" in function "new"
-     Type "str" is not assignable to type "Buffer"
-       "str" is not assignable to "bytes"
-       "str" is not assignable to "bytearray"
-       "str" is not assignable to "memoryview[int]" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_KMAC.py:328:55 - error: Argument of type "str" cannot be assigned to parameter "custom" of type "Buffer" in function "new"
-     Type "str" is not assignable to type "Buffer"
-       "str" is not assignable to "bytes"
-       "str" is not assignable to "bytearray"
-       "str" is not assignable to "memoryview[int]" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:269:13 - error: Argument of type "Module("Crypto.Hash.TupleHash128") | Module("Crypto.Hash.TupleHash256")" cannot be assigned to parameter "value" of type "None" in function "__setitem__"
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:269:13 - error: Argument of type "ModuleType" cannot be assigned to parameter "value" of type "None" in function "__setitem__"
-     Type "Module("Crypto.Hash.TupleHash128") | Module("Crypto.Hash.TupleHash256")" is not assignable to type "None"
-       Type is not assignable to "None" (reportArgumentType)
+     "ModuleType" is not assignable to "None" (reportArgumentType)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:276:13 - error: Type of "hd1" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:276:19 - error: Type of "new" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:277:13 - error: Type of "hd2" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:277:19 - error: Type of "new" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:281:17 - error: Type of "update" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:284:13 - error: Type of "update" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:286:30 - error: Type of "digest" is Any (reportAny)
+   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:287:30 - error: Type of "digest" is Any (reportAny)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:276:37 - error: Argument of type "str" cannot be assigned to parameter "custom" of type "int" in function "new"
-     "str" is not assignable to "int" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:277:37 - error: Argument of type "str" cannot be assigned to parameter "custom" of type "int" in function "new"
-     "str" is not assignable to "int" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:281:17 - error: Result of call expression is of type "TupleHash" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:281:28 - error: Argument of type "str" cannot be assigned to parameter "data" of type "Buffer" in function "update"
-     Type "str" is not assignable to type "Buffer"
-       "str" is not assignable to "bytes"
-       "str" is not assignable to "bytearray"
-       "str" is not assignable to "memoryview[int]" (reportArgumentType)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:284:13 - error: Result of call expression is of type "TupleHash" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/pycryptodome/lib/Crypto/SelfTest/Hash/test_TupleHash.py:284:25 - error: Argument of type "str" cannot be assigned to parameter "data" of type "Buffer" in function "update"
-     Type "str" is not assignable to type "Buffer"
-       "str" is not assignable to "bytes"

... (truncated 67 lines) ...

graphql-core (https://github.com/graphql-python/graphql-core)
+   /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:264:39 - error: Condition will always evaluate to False since the types "Literal[VisitorActionEnum.SKIP, VisitorActionEnum.REMOVE] | None" and "Literal[True]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:267:38 - error: Condition will always evaluate to False since the types "Literal[VisitorActionEnum.REMOVE] | None" and "Literal[False]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:344:50 - error: Condition will always evaluate to False since the types "Literal[VisitorActionEnum.BREAK, VisitorActionEnum.REMOVE] | None" and "Literal[False]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:346:53 - error: Condition will always evaluate to False since the types "Literal[VisitorActionEnum.REMOVE] | None" and "Literal[True]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:358:55 - error: Condition will always evaluate to False since the types "Literal[VisitorActionEnum.SKIP, VisitorActionEnum.REMOVE] | None" and "Literal[True]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:363:41 - error: Condition will always evaluate to True since the types "Literal[VisitorActionEnum.REMOVE]" and "Literal[False]" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/build_client_schema.py:413:26 - error: Condition will always evaluate to False since the types "IntrospectionObjectType" and "None" have no overlap (reportUnnecessaryComparison)
- 1855 errors, 0 warnings, 0 notes
+ 1860 errors, 0 warnings, 0 notes

SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
-   /tmp/mypy_primer/projects/SinbadCogs/channelredirect/redirect.py:163:34 - error: Condition will always evaluate to True since the types "CommandConverter" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/SinbadCogs/channelredirect/redirect.py:165:47 - error: Condition will always evaluate to False since the types "CommandConverter" and "None" have no overlap (reportUnnecessaryComparison)
- 6795 errors, 0 warnings, 0 notes
+ 6793 errors, 0 warnings, 0 notes

artigraph (https://github.com/artigraph/artigraph)
-   /tmp/mypy_primer/projects/artigraph/tests/arti/dummies.py:66:12 - error: Condition will always evaluate to True since the types "frozendict[PartitionKey, Fingerprint | None]" and "None" have no overlap (reportUnnecessaryComparison)
- 3551 errors, 0 warnings, 0 notes
+ 3550 errors, 0 warnings, 0 notes

mypy (https://github.com/python/mypy)
-   /tmp/mypy_primer/projects/mypy/mypy/checkexpr.py:2558:20 - error: Condition will always evaluate to False since the types "Type | UnpackType" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/checkpattern.py:663:36 - error: Condition will always evaluate to False since the types "Type | AnyType" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/constraints.py:726:49 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/constraints.py:765:47 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/fixup.py:303:12 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/fixup.py:310:12 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/server/astmerge.py:448:12 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/server/astmerge.py:460:12 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypy/server/astmerge.py:477:12 - error: Condition will always evaluate to True since the types "Instance" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/mypy/mypyc/test/test_serialization.py:66:21 - error: Type of "yv" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/mypy/mypyc/test/test_serialization.py:66:21 - error: Type of "yv" is Any (reportAny)
- 16194 errors, 0 warnings, 0 notes
+ 16185 errors, 0 warnings, 0 notes

sympy (https://github.com/sympy/sympy)
-     Type of "mod_inverse" is "(a: Unknown, m: Unknown) -> (Unknown | int)" (reportUnknownVariableType)
+     Type of "mod_inverse" is "(a: Unknown, m: Unknown) -> (int | Unknown)" (reportUnknownVariableType)
-     Type of "integer_log" is "(n: Unknown, b: Unknown) -> (tuple[Unknown, Unknown] | tuple[Literal[0], Literal[False]] | tuple[Unknown, Literal[False]] | tuple[Literal[0], bool] | tuple[int, Unknown | bool] | tuple[Unknown | int, Unknown | bool] | tuple[Any, Any])" (reportUnknownVariableType)
+     Type of "integer_log" is "(n: Unknown, b: Unknown) -> (tuple[Unknown, Unknown] | tuple[Literal[0], Literal[False]] | tuple[Unknown, Literal[False]] | tuple[Literal[0], bool] | tuple[int, bool] | tuple[Unknown | int, Unknown | bool] | tuple[Any, Any])" (reportUnknownVariableType)
-     Type of "trailing" is "(n: Unknown) -> (Unknown | Literal[0] | None)" (reportUnknownVariableType)
+     Type of "trailing" is "(n: Unknown) -> (int | None)" (reportUnknownVariableType)
-     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
+     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
-     Type of "kronecker_product" is "(*matrices: Unknown) -> (Unknown | Any | _NotImplementedType | GenericIdentity | Order | Identity)" (reportUnknownVariableType)
+     Type of "kronecker_product" is "(*matrices: Unknown) -> (Unknown | Any | _NotImplementedType | GenericIdentity | MatMul | Order | Identity)" (reportUnknownVariableType)
-     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
+     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
-     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
+     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
-     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
+     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/assumptions/refine.py:64:8 - error: Condition will always evaluate to False since the types "Expr" and "None" have no overlap (reportUnnecessaryComparison)
-     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
+     Type of "satisfiable" is "(expr: Unknown, algorithm: Unknown | None = None, all_models: bool = False, minimal: bool = False, use_lra_theory: bool = False) -> (Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None)" (reportUnknownVariableType)
-     Type of "can_be_true" is "Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None" (reportUnknownVariableType)
+     Type of "can_be_true" is "Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None" (reportUnknownVariableType)
-     Type of "can_be_false" is "Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[Unknown | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None" (reportUnknownVariableType)
+     Type of "can_be_false" is "Unknown | dict[Unknown, Unknown] | Generator[bool, None, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, None] | Generator[dict[Unknown, Unknown] | Literal[False], Any, NoReturn] | dict[Unknown, bool] | Literal[False] | None" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/benchmarks/bench_symbench.py:55:5 - error: Type of "L" is partially unknown
-     Type of "L" is "set[Unknown]" (reportUnknownVariableType)
-     Argument corresponds to parameter "args" in function "__new__" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/calculus/util.py:348:65 - error: Argument type is unknown
+   /tmp/mypy_primer/projects/sympy/sympy/calculus/util.py:348:22 - error: Argument type is unknown
-     Argument type is "tuple[Unknown, ...]" (reportUnknownArgumentType)
+     Argument type is "tuple[Unknown, *tuple[Unknown, ...]]" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/calculus/util.py:585:24 - error: Type of "g" is unknown (reportUnknownVariableType)
-     Argument type is "tuple[Unknown, ...]" (reportUnknownArgumentType)
+     Argument type is "tuple[Unknown, *tuple[Unknown, ...]]" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_matrix_nodes.py:29:30 - error: Operator "-" not supported for types "Unknown | ArrayDerivative" and "Unknown | GenericIdentity | Order"
+   /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_matrix_nodes.py:29:30 - error: Operator "-" not supported for types "Unknown | ArrayDerivative" and "Unknown | GenericIdentity | MatMul | Order"
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/fp_groups.py:991:24 - error: Argument type is partially unknown
+     Argument corresponds to parameter "o" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:1641:9 - error: Type of "u" is partially unknown
-     Type of "u" is "list[Unknown]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:1645:23 - error: Argument type is unknown
-     Argument corresponds to parameter "obj" in function "len" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:1645:30 - error: Type of "x" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/combinatorics/perm_groups.py:1645:23 - error: Argument of type "None" cannot be assigned to parameter "obj" of type "Sized" in function "len"
+     "None" is incompatible with protocol "Sized"
+       "__len__" is not present (reportArgumentType)

... (truncated 2063 lines) ...

websockets (https://github.com/aaugustin/websockets)
+   /tmp/mypy_primer/projects/websockets/tests/asyncio/test_connection.py:667:12 - error: Condition will always evaluate to False since the types "Literal[Side.CLIENT]" and "Literal[Side.SERVER]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/websockets/tests/asyncio/test_connection.py:696:12 - error: Condition will always evaluate to False since the types "Literal[Side.CLIENT]" and "Literal[Side.SERVER]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/websockets/tests/asyncio/test_connection.py:725:12 - error: Condition will always evaluate to False since the types "Literal[Side.CLIENT]" and "Literal[Side.SERVER]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/websockets/tests/sync/test_connection.py:433:12 - error: Condition will always evaluate to False since the types "Literal[Side.CLIENT]" and "Literal[Side.SERVER]" have no overlap (reportUnnecessaryComparison)
+   /tmp/mypy_primer/projects/websockets/tests/sync/test_connection.py:460:12 - error: Condition will always evaluate to False since the types "Literal[Side.CLIENT]" and "Literal[Side.SERVER]" have no overlap (reportUnnecessaryComparison)
- 7651 errors, 0 warnings, 0 notes
+ 7656 errors, 0 warnings, 0 notes

pywin32 (https://github.com/mhammond/pywin32)
-   /tmp/mypy_primer/projects/pywin32/Pythonwin/pywin/debugger/debugger.py:35:38 - warning: Condition will always evaluate to True since the types "Never" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/pywin32/Pythonwin/pywin/scintilla/view.py:657:50 - warning: Condition will always evaluate to True since the types "Never" and "None" have no overlap (reportUnnecessaryComparison)
- 5 errors, 479 warnings, 1 note
+ 5 errors, 477 warnings, 1 note

sphinx (https://github.com/sphinx-doc/sphinx)
+   /tmp/mypy_primer/projects/sphinx/sphinx/config.py:556:8 - error: Condition will always evaluate to False since the types "Collection[type]" and "type[Any]" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/sphinx/sphinx/registry.py:471:16 - error: Condition will always evaluate to False since the types "ExtensionMetadata" and "None" have no overlap (reportUnnecessaryComparison)
-   /tmp/mypy_primer/projects/sphinx/sphinx/domains/c/_ast.py:1049:12 - error: Condition will always evaluate to True since the types "ASTExpression" and "None" have no overlap (reportUnnecessaryComparison)

... (truncated 2008 lines) ...```

@DetachHead DetachHead merged commit db655ea into main Sep 25, 2024
19 checks passed
@DetachHead DetachHead deleted the merge-1.1.382 branch September 25, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants