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.395 #1108

Merged
merged 24 commits into from
Feb 26, 2025
Merged

Merge 1.1.395 #1108

merged 24 commits into from
Feb 26, 2025

Conversation

DetachHead
Copy link
Owner

fixes #1105
fixes #1071

erictraut and others added 23 commits February 11, 2025 21:40
Co-authored-by: Azure Piplines <41898282+github-actions[bot]@users.noreply.github.com>
… `__new__` method has an explicit `Any` return type annotation. In this case, type checkers should assume that the return type of `__new__` is _not_ a subtype of the containing class and should therefore ignore the `__init__` method. This addresses #9909. (#9910)
…the second both overloads have an `*args` but the first has one or more additional positional parameters. This addresses #9916. (#9921)
…ing the evaluation of a call whose target signature involves a parameter with a default argument value, notably where the type of the default value isn't assignable to the declared type of its parameter. This addresses #9901. (#9922)
…erride is an object (such as a context manager) rather than a function. This addresses #9925. (#9926)
…ror under certain circumstances. This addresses #9891. (#9927)
…lFeatures` is not true. This addresses #9928.
…ble to `TypeForm[T]` in accordance with the latest draft of PEP 747. This addresses #9900. (#9933)
…conditions involving a call to a function or method that doesn't have a return type and whose inferred return type is based on variables calculated in a loop. This addresses #9937. (#9940)
…an instance or class method to an object or class when the method accepts no "self" or "cls" parameter. This addresses #9942. (#9947)
Co-authored-by: Azure Piplines <41898282+github-actions[bot]@users.noreply.github.com>
… using a `class` statement rather than how it has traditionally been defined.
…nability of a function with an `*args` that is unpacked using a `*tuple[]`. This addresses #9974. (#9975)
…ssubclass` type guard results in a narrowed type that is synthesized as a subclass of `type` and some other class. This addresses #9971. (#9976)
…o yield statement) in a stub file or protocol definition that has a return type annotation of `AsyncGenerator`. Previously, this was assumed to be a generator even though a `yield` statement wasn't present. It is now assumed to be a `Coroutine`. This behavior is not spelled out in the typing spec, but pyright's new behavior is now consistent with mypy's. (#9978)
…e argument expression supplies the objects for an `*args` parameter that is annotated with an unpacked TypeVarTuple. This addresses #9980. (#9981)
# Conflicts:
#	lerna.json
#	packages/pyright-internal/package-lock.json
#	packages/pyright-internal/src/analyzer/cacheManager.ts
#	packages/pyright-internal/src/analyzer/checker.ts
#	packages/pyright-internal/src/analyzer/program.ts
#	packages/pyright-internal/src/analyzer/typePrinter.ts
#	packages/pyright-internal/src/backgroundAnalysisBase.ts
#	packages/pyright-internal/src/common/languageServerInterface.ts
#	packages/pyright-internal/src/common/realFileSystem.ts
#	packages/pyright-internal/src/common/serviceProviderExtensions.ts
#	packages/pyright-internal/src/languageServerBase.ts
#	packages/pyright-internal/src/localization/package.nls.ru.json
#	packages/pyright-internal/src/localization/package.nls.zh-cn.json
#	packages/pyright-internal/src/server.ts
#	packages/pyright-internal/src/tests/completions.test.ts
#	packages/pyright-internal/src/tests/harness/fourslash/testState.ts
#	packages/pyright/package-lock.json
#	packages/pyright/package.json
#	packages/vscode-pyright/CHANGELOG.md
#	packages/vscode-pyright/package-lock.json
#	packages/vscode-pyright/package.json

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

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

attrs (https://github.com/python-attrs/attrs)
+   /tmp/mypy_primer/projects/attrs/bench/test_benchmarks.py:82:9 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "z" in function "__init__"
+     Argument type is "dict[Unknown, Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/bench/test_benchmarks.py:89:10 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "z" in function "__init__"
+     Argument type is "dict[Unknown, Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/bench/test_benchmarks.py:90:10 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "z" in function "__init__"
+     Argument type is "dict[Unknown, Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/bench/test_benchmarks.py:100:10 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "z" in function "__init__"
+     Argument type is "dict[Unknown, Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/test_annotations.py:116:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "x" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:425:14 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "a" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:425:14 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "b" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:425:14 - warning: Argument type is Any
+     Argument corresponds to parameter "c" in function "__init__" (reportAny)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:426:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "a" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:426:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "b" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:426:13 - warning: Argument type is Any
+     Argument corresponds to parameter "c" in function "__init__" (reportAny)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:436:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "a" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:436:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "b" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:436:13 - warning: Argument type is Any
+     Argument corresponds to parameter "c" in function "__init__" (reportAny)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:437:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "a" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:437:13 - warning: Argument type is partially unknown
+     Argument corresponds to parameter "b" in function "__init__"
+     Argument type is "list[Unknown]" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/attrs/tests/typing_example.py:437:13 - warning: Argument type is Any
+     Argument corresponds to parameter "c" in function "__init__" (reportAny)
- 977 errors, 7045 warnings, 5 notes
+ 977 errors, 7062 warnings, 5 notes

websockets (https://github.com/aaugustin/websockets)
+     "AsyncGenerator[bytes | bytearray | memoryview[int], Unknown, Unknown]" is not assignable to "AsyncIterator[Data]"
+       Type parameter "_T_co@AsyncIterator" is covariant, but "bytes | bytearray | memoryview[int]" is not a subtype of "Data"
-     Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
+         Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
-       Type "bytearray" is not assignable to type "Data"
+           Type "bytearray" is not assignable to type "Data"
-         "bytearray" is not assignable to "str"
+             "bytearray" is not assignable to "str"
-         "bytearray" is not assignable to "bytes"
+             "bytearray" is not assignable to "bytes"
-         Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)
+             Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)
+     "AsyncGenerator[bytes | bytearray | memoryview[int], Unknown, Unknown]" is not assignable to "AsyncIterator[Data]"
+       Type parameter "_T_co@AsyncIterator" is covariant, but "bytes | bytearray | memoryview[int]" is not a subtype of "Data"
-     Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
+         Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
-       Type "bytearray" is not assignable to type "Data"
+           Type "bytearray" is not assignable to type "Data"
-         "bytearray" is not assignable to "str"
+             "bytearray" is not assignable to "str"
-         "bytearray" is not assignable to "bytes"
+             "bytearray" is not assignable to "bytes"
-         Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)
+             Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:641:15 - warning: Type of "protocol" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:641:15 - warning: Type of "close" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:641:15 - warning: Type of "close" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:641:29 - error: Cannot access attribute "close" for class "BaseProtocol*"
-     Attribute "close" is unknown (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:652:29 - warning: Type of "protocol" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:654:27 - warning: Type of "handshake" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:654:27 - warning: Type of "handshake" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:654:36 - error: Cannot access attribute "handshake" for class "BaseProtocol*"
-     Attribute "handshake" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:656:32 - warning: Type of "origin" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:656:32 - warning: Type of "origin" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:656:41 - error: Cannot access attribute "origin" for class "BaseProtocol*"
-     Attribute "origin" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:657:46 - warning: Type of "available_extensions" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:657:46 - warning: Type of "available_extensions" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:657:55 - error: Cannot access attribute "available_extensions" for class "BaseProtocol*"
-     Attribute "available_extensions" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:658:48 - warning: Type of "available_subprotocols" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:658:48 - warning: Type of "available_subprotocols" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:658:57 - error: Cannot access attribute "available_subprotocols" for class "BaseProtocol*"
-     Attribute "available_subprotocols" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:659:39 - warning: Type of "extra_headers" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:659:39 - warning: Type of "extra_headers" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:659:48 - error: Cannot access attribute "extra_headers" for class "BaseProtocol*"
-     Attribute "extra_headers" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:662:21 - warning: Type of "fail_connection" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:662:21 - warning: Type of "fail_connection" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:662:30 - error: Cannot access attribute "fail_connection" for class "BaseProtocol*"
-     Attribute "fail_connection" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:663:27 - warning: Type of "wait_closed" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:663:27 - warning: Type of "wait_closed" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:663:36 - error: Cannot access attribute "wait_closed" for class "BaseProtocol*"
-     Attribute "wait_closed" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:667:21 - warning: Type of "fail_connection" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:667:21 - warning: Type of "fail_connection" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:667:30 - error: Cannot access attribute "fail_connection" for class "BaseProtocol*"
-     Attribute "fail_connection" is unknown (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:668:27 - warning: Type of "wait_closed" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:668:27 - warning: Type of "wait_closed" is Any (reportAny)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:671:21 - warning: Type of "protocol" is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:668:36 - error: Cannot access attribute "wait_closed" for class "BaseProtocol*"
-     Attribute "wait_closed" is unknown (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:672:28 - warning: Return type is Any (reportAny)
-   /tmp/mypy_primer/projects/websockets/src/websockets/legacy/client.py:672:28 - error: Type "_ProtocolT@create_unix_connection | _ProtocolT@create_connection" is not assignable to return type "WebSocketClientProtocol"
-     Type "BaseProtocol*" is not assignable to type "WebSocketClientProtocol"
-       "BaseProtocol*" is not assignable to "WebSocketClientProtocol" (reportReturnType)
+     "Generator[bytes | bytearray | memoryview[int], Unknown, Unknown]" is not assignable to "Iterator[Data]"
+       Type parameter "_T_co@Iterator" is covariant, but "bytes | bytearray | memoryview[int]" is not a subtype of "Data"
-     Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
+         Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
-       Type "bytearray" is not assignable to type "Data"
+           Type "bytearray" is not assignable to type "Data"
-         "bytearray" is not assignable to "str"
+             "bytearray" is not assignable to "str"
-         "bytearray" is not assignable to "bytes"
+             "bytearray" is not assignable to "bytes"
-         Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)
+             Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)
+     "Generator[bytes | bytearray | memoryview[int], Unknown, Unknown]" is not assignable to "Iterator[Data]"
+       Type parameter "_T_co@Iterator" is covariant, but "bytes | bytearray | memoryview[int]" is not a subtype of "Data"
-     Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
+         Type "bytes | bytearray | memoryview[int]" is not assignable to type "Data"
-       Type "bytearray" is not assignable to type "Data"
+           Type "bytearray" is not assignable to type "Data"
-         "bytearray" is not assignable to "str"
+             "bytearray" is not assignable to "str"
-         "bytearray" is not assignable to "bytes"
+             "bytearray" is not assignable to "bytes"
-         Set disableBytesTypePromotions to false to enable type promotion behavior for "bytearray" and "memoryview" (reportReturnType)

... (truncated 3 lines) ...

dedupe (https://github.com/dedupeio/dedupe)
-     Type "tuple[tuple[RecordID, ...], Unknown]" is not assignable to type "ClusterInt | ClusterStr"
+     Type "Generator[tuple[tuple[RecordID, ...], Unknown], Unknown, Unknown]" is not assignable to type "Clusters"
+       "Generator[tuple[tuple[RecordID, ...], Unknown], Unknown, Unknown]" is not assignable to "Iterable[ClusterInt]"
+         Type parameter "_T_co@Iterable" is covariant, but "tuple[tuple[RecordID, ...], Unknown]" is not a subtype of "ClusterInt"
-       "tuple[tuple[RecordID, ...], Unknown]" is not assignable to "Tuple[Tuple[int, ...], Unknown | Tuple[float, ...]]"
+           "tuple[tuple[RecordID, ...], Unknown]" is not assignable to "Tuple[Tuple[int, ...], Unknown | Tuple[float, ...]]"
-         Tuple entry 1 is incorrect type
-           "tuple[RecordID, ...]" is not assignable to "Tuple[int, ...]"
+       "Generator[tuple[tuple[RecordID, ...], Unknown], Unknown, Unknown]" is not assignable to "Iterable[ClusterStr]"
+         Type parameter "_T_co@Iterable" is covariant, but "tuple[tuple[RecordID, ...], Unknown]" is not a subtype of "ClusterStr"
-       "tuple[tuple[RecordID, ...], Unknown]" is not assignable to "Tuple[Tuple[str, ...], Unknown | Tuple[float, ...]]"
+           "tuple[tuple[RecordID, ...], Unknown]" is not assignable to "Tuple[Tuple[str, ...], Unknown | Tuple[float, ...]]"
-         Tuple entry 1 is incorrect type
-           "tuple[RecordID, ...]" is not assignable to "Tuple[str, ...]"

werkzeug (https://github.com/pallets/werkzeug)
+   /tmp/mypy_primer/projects/werkzeug/src/werkzeug/test.py:1117:20 - error: Argument of type "tuple[()]" cannot be assigned to parameter "history" of type "tuple[TestResponse]" in function "__init__"
+     "tuple[()]" is not assignable to "tuple[TestResponse]"
+       Tuple size mismatch; expected 1 but received 0 (reportArgumentType)
- 359 errors, 2364 warnings, 0 notes
+ 360 errors, 2364 warnings, 0 notes

alerta (https://github.com/alerta/alerta)
+   /tmp/mypy_primer/projects/alerta/wsgi.py:3:7 - error: Argument of type "None" cannot be assigned to parameter "config_override" of type "Dict[str, Any]" in function "create_app"
+     "None" is not assignable to "Dict[str, Any]" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/wsgi.py:3:7 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/app.py:106:18 - error: Argument of type "None" cannot be assigned to parameter "config_override" of type "Dict[str, Any]" in function "create_app"
+     "None" is not assignable to "Dict[str, Any]" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/app.py:106:18 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/tasks.py:18:17 - error: Argument of type "None" cannot be assigned to parameter "customers" of type "List[str]" in function "find_by_id"
+     "None" is not assignable to "List[str]" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/auth/basic.py:61:13 - error: Argument of type "None" cannot be assigned to parameter "picture" of type "str" in function "create_token"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/auth/basic.py:102:13 - error: Argument of type "None" cannot be assigned to parameter "picture" of type "str" in function "create_token"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/auth/basic_ldap.py:171:13 - error: Argument of type "None" cannot be assigned to parameter "picture" of type "str" in function "create_token"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/auth/decorators.py:76:27 - error: Argument of type "None" cannot be assigned to parameter "key" of type "str" in function "parse"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/auth/saml.py:113:13 - error: Argument of type "None" cannot be assigned to parameter "picture" of type "str" in function "create_token"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/auth/userinfo.py:23:24 - error: Argument of type "None" cannot be assigned to parameter "key" of type "str" in function "parse"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/management/views.py:142:22 - error: Argument of type "None" cannot be assigned to parameter "query" of type "Query" in function "find_all"
+     "None" is not assignable to "Query" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/management/views.py:234:27 - error: Argument of type "None" cannot be assigned to parameter "query" of type "Query" in function "get_count"
+     "None" is not assignable to "Query" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/management/views.py:251:27 - error: Argument of type "None" cannot be assigned to parameter "query" of type "Query" in function "get_count"
+     "None" is not assignable to "Query" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/models/alert.py:43:27 - error: Argument of type "Unknown | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+     Type "Unknown | None" is not assignable to type "ConvertibleToInt"
+       Type "None" is not assignable to type "ConvertibleToInt"
+         "None" is not assignable to "str"
+         "None" is incompatible with protocol "Buffer"
+           "__buffer__" is not present
+         "None" is incompatible with protocol "SupportsInt"
+           "__int__" is not present
+         "None" is incompatible with protocol "SupportsIndex" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/models/alert.py:528:16 - error: Argument of type "None" cannot be assigned to parameter "query" of type "Query" in function "get_topn_flapping"
+     "None" is not assignable to "Query" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/models/alert.py:537:16 - error: Argument of type "None" cannot be assigned to parameter "query" of type "Query" in function "get_topn_standing"
+     "None" is not assignable to "Query" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/plugins/heartbeat.py:20:18 - error: Argument of type "None" cannot be assigned to parameter "create_time" of type "datetime" in function "__init__"
+     "None" is not assignable to "datetime" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/blackouts.py:53:16 - error: Argument of type "None" cannot be assigned to parameter "customers" of type "List[str]" in function "find_by_id"
+     "None" is not assignable to "List[str]" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/blackouts.py:103:20 - error: Argument of type "None" cannot be assigned to parameter "customers" of type "List[str]" in function "find_by_id"
+     "None" is not assignable to "List[str]" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/blackouts.py:105:20 - error: Argument of type "None" cannot be assigned to parameter "customers" of type "List[str]" in function "find_by_id"
+     "None" is not assignable to "List[str]" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/keys.py:63:15 - error: Argument of type "None" cannot be assigned to parameter "user" of type "str" in function "find_by_id"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/keys.py:65:15 - error: Argument of type "None" cannot be assigned to parameter "user" of type "str" in function "find_by_id"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/keys.py:125:15 - error: Argument of type "None" cannot be assigned to parameter "user" of type "str" in function "find_by_id"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/keys.py:127:15 - error: Argument of type "None" cannot be assigned to parameter "user" of type "str" in function "find_by_id"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/views/keys.py:157:11 - error: Argument of type "None" cannot be assigned to parameter "user" of type "str" in function "find_by_id"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/webhooks/pagerduty.py:89:31 - error: Argument of type "None" cannot be assigned to parameter "timeout" of type "int" in function "set_status"
+     "None" is not assignable to "int" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/webhooks/slack.py:88:13 - error: Argument of type "None" cannot be assigned to parameter "timeout" of type "int" in function "from_action"
+     "None" is not assignable to "int" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/alerta/webhooks/telegram.py:84:17 - error: Argument of type "None" cannot be assigned to parameter "timeout" of type "int" in function "from_action"
+     "None" is not assignable to "int" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_actions.py:18:20 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_aggregations.py:18:20 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_alerts.py:22:20 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_auth.py:36:20 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_auth.py:48:28 - error: Argument of type "None" cannot be assigned to parameter "expire_time" of type "datetime" in function "__init__"
+     "None" is not assignable to "datetime" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_auth.py:48:28 - error: Argument of type "None" cannot be assigned to parameter "customer" of type "str" in function "__init__"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_auth.py:250:19 - error: Argument of type "None" cannot be assigned to parameter "key" of type "str" in function "parse"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_auth.py:491:19 - error: Argument of type "None" cannot be assigned to parameter "key" of type "str" in function "parse"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_authproxy.py:20:20 - error: Argument of type "None" cannot be assigned to parameter "environment" of type "str" in function "create_app"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/alerta/tests/test_authproxy.py:32:28 - error: Argument of type "None" cannot be assigned to parameter "expire_time" of type "datetime" in function "__init__"
+     "None" is not assignable to "datetime" (reportArgumentType)

... (truncated 216 lines) ...

paasta (https://github.com/yelp/paasta)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/broadcast_log_to_services.py:58:5 - warning: Argument type is unknown
+     Argument corresponds to parameter "soa_dir" in function "broadcast_log_all_services_running_here" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/check_kubernetes_services_replication.py:137:5 - error: Argument of type "None" cannot be assigned to parameter "namespace" of type "str" in function "main"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/check_oom_events.py:228:32 - error: Argument of type "None" cannot be assigned to parameter "instance_type" of type "str" in function "get_services_for_cluster"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/check_spark_jobs.py:196:26 - warning: Argument type is unknown
+     Argument corresponds to parameter "soa_dir" in function "list_services" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/cleanup_kubernetes_jobs.py:245:9 - error: Argument of type "None" cannot be assigned to parameter "cluster" of type "str" in function "get_services_for_cluster"
+     "None" is not assignable to "str" (reportArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/generate_services_file.py:62:30 - warning: Argument type is unknown
+     Argument corresponds to parameter "soa_dir" in function "get_all_namespaces_for_service" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/generate_services_file.py:73:20 - warning: Argument type is unknown
+     Argument corresponds to parameter "soa_dir" in function "get_all_namespaces" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/paasta/paasta_tools/kubernetes_tools.py:558:9 - error: "__new__" overrides method of same name in class "object" with incompatible type "_lru_cache_wrapper[KubeClient]" (reportIncompatibleMethodOverride)
-   /tmp/mypy_primer/projects/paasta/paasta_tools/kubernetes_tools.py:570:9 - error: "__init__" overrides method of same name in class "object" with incompatible type "_lru_cache_wrapper[None]" (reportIncompatibleMethodOverride)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/kubernetes_tools.py:2144:36 - warning: Argument type is unknown
+     Argument corresponds to parameter "soa_dir" in function "load_service_namespace_config" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/mesos_maintenance.py:461:54 - error: Argument of type "Unknown | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+     Type "Unknown | None" is not assignable to type "ConvertibleToInt"
+       Type "None" is not assignable to type "ConvertibleToInt"
+         "None" is not assignable to "str"
+         "None" is incompatible with protocol "Buffer"
+           "__buffer__" is not present
+         "None" is incompatible with protocol "SupportsInt"
+           "__int__" is not present
+         "None" is incompatible with protocol "SupportsIndex" (reportArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/mesos_maintenance.py:463:57 - error: Argument of type "Unknown | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+     Type "Unknown | None" is not assignable to type "ConvertibleToInt"
+       Type "None" is not assignable to type "ConvertibleToInt"
+         "None" is not assignable to "str"
+         "None" is incompatible with protocol "Buffer"
+           "__buffer__" is not present
+         "None" is incompatible with protocol "SupportsInt"
+           "__int__" is not present
+         "None" is incompatible with protocol "SupportsIndex" (reportArgumentType)
+   /tmp/mypy_primer/projects/paasta/paasta_tools/oom_logger.py:236:35 - warning: Argument type is unknown

... (truncated 3945 lines) ...```

@DetachHead DetachHead merged commit 4d9a030 into main Feb 26, 2025
20 checks passed
@DetachHead DetachHead deleted the merge-1.1.395 branch February 26, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants