fixed covariant mapping value type used in overload#15501
fixed covariant mapping value type used in overload#15501randolf-scholz wants to merge 9 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This reverts commit 22cef60.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I'm afraid this won't be solvable from typeshed's sides without producing a lot of churn. It seems to me that the stubs due to historic reasons and Get signature should imo just look like so: @overload
def get(self, key: K, /) -> V | None: ...
@overload
def get[T](self, key: K, default: T, /) -> V | T: ...or even just (python/typing#2213): def get[S=None](self, key, default: S = None) -> T | S: ...but not this convoluted mess ... @overload
def get(self, key: _KT, default: None = None, /) -> _VT | None: ...
@overload
def get(self, key: _KT, default: _VT, /) -> _VT: ...
@overload
def get(self, key: _KT, default: _T, /) -> _VT | _T: ... |
|
This could be fixed without explicit variance by just typing it accurately: One common use of this is for using a dict to transform a token stream, leaving tokens of kinds not transformed unaltered. ( The actual signature of get for mapping should be should be: class Mapping[K, V]:
def get[D](self, key: Hashable, default: D = None, /) -> V | D: ... |
|
Well yes that is essentially the Using There were some strong opinions against using |
|
I don't really agree with not using hashable, but I'm aware there are issues with how type checkers allow removing hashability in subtypes. Would be better to move any special casing here to Hashable until it's resolved, but still use Hashable so that any type checker capable of detecting that is enabled to. the typeshed should really reflect runtime reality, while typecheckers should then handle any exceptions they need themselves |
This comment has been minimized.
This comment has been minimized.
|
Diff from mypy_primer, showing the effect of this PR on open source code: beartype (https://github.com/beartype/beartype)
- beartype/_check/error/errcause.py:568: error: Unused "type: ignore" comment [unused-ignore]
+ beartype/_check/error/errcause.py:567: error: Unused "type: ignore" comment [unused-ignore]
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/domains/cpp/__init__.py: note: In member "run" of class "CPPAliasObject":
+ sphinx/domains/cpp/__init__.py:842:40: error: Argument 2 to "AliasNode" has incompatible type "dict[str, Any | int]"; expected "dict[str, bool]" [arg-type]
+ sphinx/domains/c/__init__.py: note: In member "run" of class "CAliasObject":
+ sphinx/domains/c/__init__.py:699:32: error: Argument 2 to "AliasNode" has incompatible type "dict[str, Any | int]"; expected "dict[str, bool]" [arg-type]
+ sphinx/jinja2glue.py: note: In function "warning":
+ sphinx/jinja2glue.py:113:20: error: Unsupported left operand type for + ("None") [operator]
+ sphinx/jinja2glue.py:113:20: note: Both left and right operands are unions
xarray (https://github.com/pydata/xarray)
+ xarray/core/indexing.py: note: In function "group_indexers_by_index":
+ xarray/core/indexing.py:149: error: Argument 2 to "get" of "Mapping" has incompatible type "None"; expected "Index" [arg-type]
+ xarray/core/indexing.py: note: At top level:
+ xarray/core/common.py: note: In function "full_like":
+ xarray/core/common.py:1708: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "type[Any] | dtype[Any] | _HasDType[dtype[Any]] | _HasNumPyDType[dtype[Any]] | tuple[Any, Any] | list[Any] | _DTypeDict | str" [arg-type]
+ xarray/core/common.py:1708: error: Argument 2 to "get" of "Mapping" has incompatible type "None"; expected "type[Any] | dtype[Any] | _HasDType[dtype[Any]] | _HasNumPyDType[dtype[Any]] | tuple[Any, Any] | list[Any] | _DTypeDict | str" [arg-type]
+ xarray/backends/common.py: note: In function "_find_absolute_paths":
+ xarray/backends/common.py:169: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ xarray/backends/common.py:169: note: Possible overload variants:
+ xarray/backends/common.py:169: note: def get(self, Never, /) -> None
+ xarray/backends/common.py:169: note: def [_T] get(self, Never, _T, /) -> _T
+ xarray/computation/rolling.py: note: In member "_mapping_to_list" of class "Rolling":
+ xarray/computation/rolling.py:243: error: Argument 2 to "get" of "Mapping" has incompatible type "_T | None"; expected "_T" [arg-type]
zulip (https://github.com/zulip/zulip)
+ zerver/lib/markdown/api_arguments_table_generator.py:222: error: Need type annotation for "object_values" [var-annotated]
+ zerver/lib/markdown/api_arguments_table_generator.py:236: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ zerver/lib/markdown/api_arguments_table_generator.py:236: note: Possible overload variants:
+ zerver/lib/markdown/api_arguments_table_generator.py:236: note: def get(self, Never, /) -> None
+ zerver/lib/markdown/api_arguments_table_generator.py:236: note: def [_T] get(self, Never, _T, /) -> _T
+ zerver/lib/markdown/api_arguments_table_generator.py:241: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ zerver/lib/markdown/api_arguments_table_generator.py:241: note: Possible overload variants:
+ zerver/lib/markdown/api_arguments_table_generator.py:241: note: def get(self, Never, /) -> None
+ zerver/lib/markdown/api_arguments_table_generator.py:241: note: def [_T] get(self, Never, _T, /) -> _T
+ zerver/management/commands/makemessages.py:188: error: Need type annotation for "ignore_patterns" [var-annotated]
+ corporate/lib/stripe.py:494: error: Need type annotation for "err" [var-annotated]
+ zerver/data_import/slack.py:1120: error: Argument 2 to "get_parent_user_id_from_thread_message" has incompatible type "Any | bool"; expected "str" [arg-type]
+ zerver/data_import/slack.py:1191: error: Need type annotation for "files" [var-annotated]
+ zerver/tornado/event_queue.py:920: error: Need type annotation for "internal_data" [var-annotated]
+ zerver/tornado/event_queue.py:928: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:930: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:937: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:939: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:946: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:950: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:957: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/tornado/event_queue.py:961: error: Incompatible types in assignment (expression has type "Any | None", variable has type "bool") [assignment]
+ zerver/webhooks/sentry/view.py:257: error: Need type annotation for "event" [var-annotated]
+ zerver/tests/test_signup.py:2229: error: Need type annotation for "return_data" [var-annotated]
+ zerver/lib/scim.py:193: error: Need type annotation for "name_attr_dict" [var-annotated]
+ zerver/tests/test_tornado.py:79: error: Need type annotation for "headers" [var-annotated]
+ zerver/data_import/rocketchat.py:858: error: Argument 2 to "get" of "dict" has incompatible type "list[Never]"; expected "dict[str, dict[str, Any]]" [arg-type]
+ zerver/tests/test_slack_importer.py:218: error: Argument "users" to "channel_message_to_zerver_message" has incompatible type "dict[str, Any] | Any"; expected "list[dict[str, Any]]" [arg-type]
colour (https://github.com/colour-science/colour)
- colour/utilities/network.py:1459: error: Item "None" of "Any | None" has no attribute "connect" [union-attr]
+ colour/utilities/network.py:1459: error: Item "None" of "Any | Port | None" has no attribute "connect" [union-attr]
+ colour/utilities/network.py:1459: error: Argument 1 to "connect" of "Port" has incompatible type "Port | None"; expected "Port" [arg-type]
- colour/utilities/network.py:1507: error: Item "None" of "Any | None" has no attribute "disconnect" [union-attr]
+ colour/utilities/network.py:1507: error: Item "None" of "Any | Port | None" has no attribute "disconnect" [union-attr]
+ colour/utilities/network.py:1507: error: Argument 1 to "disconnect" of "Port" has incompatible type "Port | None"; expected "Port" [arg-type]
+ colour/io/luts/lut.py:1151: error: Need type annotation for "interpolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:1153: error: Need type annotation for "extrapolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:1586: error: Need type annotation for "interpolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:1588: error: Need type annotation for "extrapolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:2286: error: Need type annotation for "interpolator_kwargs" [var-annotated]
+ colour/geometry/primitives.py:151: error: Incompatible types in assignment (expression has type "Any | str", variable has type "Literal['-x', '+x', '-y', '+y', '-z', '+z', 'xy', 'xz', 'yz', 'yx', 'zx', 'zy']") [assignment]
+ colour/plotting/common.py:844: error: Argument 3 to "text" of "Axes" has incompatible type "str | int | float"; expected "str" [arg-type]
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/structured_configs/_implementations.py:2878: error: Incompatible types in assignment (expression has type "tuple[str, Any, Any]", variable has type "tuple[str, Any]") [assignment]
+ src/hydra_zen/structured_configs/_implementations.py:2878: error: Incompatible types in assignment (expression has type "tuple[str, Any | type[Any], Any]", variable has type "tuple[str, Any | type[Any]]") [assignment]
- src/hydra_zen/structured_configs/_implementations.py:2879: error: Argument 1 to "append" of "list" has incompatible type "tuple[str, Any]"; expected "tuple[str, type, Field[Any]]" [arg-type]
+ src/hydra_zen/structured_configs/_implementations.py:2879: error: Argument 1 to "append" of "list" has incompatible type "tuple[str, Any | type[Any]]"; expected "tuple[str, type, Field[Any]]" [arg-type]
poetry (https://github.com/python-poetry/poetry)
+ src/poetry/packages/locker.py:101: error: Need type annotation for "metadata" [var-annotated]
+ src/poetry/packages/locker.py:296: error: Need type annotation for "project_content" [var-annotated]
+ src/poetry/packages/locker.py:298: error: Need type annotation for "group_content" [var-annotated]
+ src/poetry/packages/locker.py:302: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/poetry/packages/locker.py:302: note: Possible overload variants:
+ src/poetry/packages/locker.py:302: note: def get(self, Never, /) -> None
+ src/poetry/packages/locker.py:302: note: def [_T] get(self, Never, _T, /) -> _T
+ src/poetry/packages/locker.py:390: error: Need type annotation for "source" [var-annotated]
+ src/poetry/packages/locker.py:394: error: Argument 1 to "joinpath" of "PurePath" has incompatible type "Any | None"; expected "str | PathLike[str]" [arg-type]
+ src/poetry/packages/locker.py:432: error: Argument 1 to "Path" has incompatible type "Any | None"; expected "str | PathLike[str]" [arg-type]
+ src/poetry/packages/locker.py:449: error: Need type annotation for "extras" [var-annotated]
+ src/poetry/utils/authenticator.py:241: error: Argument 2 to "send" of "Session" has incompatible type "**dict[str, Any | int]"; expected "bool | None" [arg-type]
+ src/poetry/utils/authenticator.py:241: error: Argument 2 to "send" of "Session" has incompatible type "**dict[str, Any | int]"; expected "bool | str | None" [arg-type]
+ src/poetry/utils/authenticator.py:241: error: Argument 2 to "send" of "Session" has incompatible type "**dict[str, Any | int]"; expected "MutableMapping[str, str] | None" [arg-type]
+ src/poetry/utils/authenticator.py:241: error: Argument 2 to "send" of "Session" has incompatible type "**dict[str, Any | int]"; expected "str | tuple[str, str] | None" [arg-type]
+ src/poetry/utils/authenticator.py:241: error: Argument 2 to "send" of "Session" has incompatible type "**dict[str, Any | int]"; expected "bool" [arg-type]
+ src/poetry/factory.py:378: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ src/poetry/factory.py:378: note: Possible overload variants:
+ src/poetry/factory.py:378: note: def get(self, Never, /) -> None
+ src/poetry/factory.py:378: note: def [_T] get(self, Never, _T, /) -> _T
+ tests/console/commands/self/utils.py:26: error: Need type annotation for "content" [var-annotated]
+ src/poetry/console/commands/version.py:72: error: Need type annotation for "project_content" [var-annotated]
+ src/poetry/console/commands/version.py:75: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/poetry/console/commands/version.py:75: note: Possible overload variants:
+ src/poetry/console/commands/version.py:75: note: def get(self, Never, /) -> None
+ src/poetry/console/commands/version.py:75: note: def [_T] get(self, Never, _T, /) -> _T
+ src/poetry/console/commands/remove.py:67: error: Need type annotation for "project_content" [var-annotated]
+ src/poetry/console/commands/remove.py:68: error: Need type annotation for "groups_content" [var-annotated]
+ src/poetry/console/commands/remove.py:69: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/poetry/console/commands/remove.py:69: note: Possible overload variants:
+ src/poetry/console/commands/remove.py:69: note: def get(self, Never, /) -> None
+ src/poetry/console/commands/remove.py:69: note: def [_T] get(self, Never, _T, /) -> _T
+ src/poetry/console/commands/remove.py:249: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/poetry/console/commands/remove.py:249: note: Possible overload variants:
+ src/poetry/console/commands/remove.py:249: note: def get(self, Never, /) -> None
+ src/poetry/console/commands/remove.py:249: note: def [_T] get(self, Never, _T, /) -> _T
+ src/poetry/console/commands/add.py:155: error: No overload variant of "get" of "dict" matches argument types "str", "Any" [call-overload]
+ src/poetry/console/commands/add.py:155: note: Possible overload variants:
+ src/poetry/console/commands/add.py:155: note: def get(self, Never, /) -> None
+ src/poetry/console/commands/add.py:155: note: def [_T] get(self, Never, _T, /) -> _T
+ src/poetry/console/commands/add.py:156: error: Need type annotation for "groups_content" [var-annotated]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/internal/logger.py:162: note: def get(self, Any, Any, /) -> Any
- ddtrace/internal/coverage/instrumentation_py3_12.py:116: error: Incompatible types in assignment (expression has type "tuple[str, tuple[str] | None] | None", variable has type "tuple[str, tuple[str] | None]") [assignment]
+ ddtrace/internal/coverage/instrumentation_py3_12.py:116: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "tuple[str, tuple[str] | None]" [arg-type]
- ddtrace/internal/schema/__init__.py:39: note: def get(self, Any, Any, /) -> Any
- ddtrace/bootstrap/cloning.py:15: note: def get(self, Any, Any, /) -> Any
+ ddtrace/appsec/sca/_instrumenter.py:246: error: Need type annotation for "cve_ids" [var-annotated]
+ ddtrace/_trace/utils_botocore/span_pointers/dynamodb.py:292: error: Need type annotation for "unprocessed_items" [var-annotated]
+ ddtrace/internal/openfeature/_native.py:85: error: Need type annotation for "attributes" [var-annotated]
- ddtrace/contrib/internal/aiohttp/patch.py:41: note: def get(self, Any, Any, /) -> Any
+ ddtrace/llmobs/_utils.py:399: error: Need type annotation for "metadata_dd" [var-annotated]
+ ddtrace/llmobs/_writer.py:163: error: Need type annotation for "endpoints" [var-annotated]
+ ddtrace/llmobs/_writer.py:913: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_writer.py:913: note: Possible overload variants:
+ ddtrace/llmobs/_writer.py:913: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_writer.py:913: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/appsec/_asm_request_context.py:326: error: Need type annotation for "req_headers" [var-annotated]
+ ddtrace/appsec/_asm_request_context.py:329: error: Need type annotation for "res_headers" [var-annotated]
+ ddtrace/appsec/_ddwaf/waf.py:84: error: Need type annotation for "rules" [var-annotated]
+ ddtrace/appsec/_ddwaf/waf.py:85: error: Need type annotation for "errors_result" [var-annotated]
+ ddtrace/llmobs/_integrations/utils.py:246: error: Need type annotation for "toolUse" [var-annotated]
+ ddtrace/llmobs/_integrations/utils.py:963: error: Need type annotation for "input_data" [var-annotated]
+ ddtrace/llmobs/_integrations/utils.py:981: error: Need type annotation for "variables" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:177: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:177: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:177: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:177: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:196: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:196: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:196: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:196: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:219: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:219: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:219: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:219: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:247: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:247: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:247: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:247: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:280: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:280: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:280: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:280: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:294: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:294: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:294: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:294: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:308: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:308: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:308: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:308: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:358: error: Need type annotation for "bedrock_metadata" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:361: error: Need type annotation for "parsed_response" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:365: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:365: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:365: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:365: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:368: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:368: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:368: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:368: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:371: error: No overload variant of "get" of "dict" matches argument types "str", "int" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:371: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:371: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:371: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:372: error: No overload variant of "get" of "dict" matches argument types "str", "int" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:372: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:372: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:372: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:401: error: Need type annotation for "bedrock_tool_call" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:402: error: Incompatible types in assignment (expression has type "Any | None", variable has type "str") [assignment]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:403: error: Need type annotation for "params" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:411: error: Incompatible types in assignment (expression has type "Any | None", variable has type "str") [assignment]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:412: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:412: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:412: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:412: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:415: error: Incompatible types in assignment (expression has type "Any | None", variable has type "str") [assignment]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:419: error: Incompatible types in assignment (expression has type "Any | None", variable has type "str") [assignment]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:440: error: Need type annotation for "bedrock_metadata" (hint: "bedrock_metadata: dict[<type>, <type>] = ...") [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:442: error: Need type annotation for "output_chunk" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:448: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:448: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:448: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:448: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:452: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:452: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock_agents.py:452: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock_agents.py:452: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/bedrock_agents.py:496: error: Need type annotation for "nested_trace_dict" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock_agents.py:496: error: Argument 1 to "get" of "dict" has incompatible type "Any | str"; expected "Never" [arg-type]
+ ddtrace/appsec/_exploit_prevention/stack_traces.py:51: error: Need type annotation for "current_list" [var-annotated]
+ ddtrace/llmobs/_integrations/vertexai.py:41: error: Need type annotation for "history" [var-annotated]
+ ddtrace/llmobs/_integrations/vertexai.py:42: error: Need type annotation for "metrics" [var-annotated]
- ddtrace/llmobs/_integrations/pydantic_ai.py:49: error: Incompatible return value type (got "tuple[Any | str, Any | None]", expected "tuple[str, str]") [return-value]
+ ddtrace/llmobs/_integrations/pydantic_ai.py:49: error: Incompatible return value type (got "tuple[Any | str, str | Any | None]", expected "tuple[str, str]") [return-value]
+ ddtrace/llmobs/_integrations/langgraph.py:81: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ ddtrace/llmobs/_integrations/langgraph.py:81: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/langgraph.py:81: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/langgraph.py:81: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/langgraph.py:287: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ ddtrace/llmobs/_integrations/langgraph.py:287: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/langgraph.py:287: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/langgraph.py:287: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/langchain.py:820: error: Need type annotation for "tool_input" [var-annotated]
+ ddtrace/llmobs/_integrations/langchain.py:824: error: Need type annotation for "tool_info" [var-annotated]
+ ddtrace/llmobs/_integrations/crewai.py:445: error: Need type annotation for "finished_task_node" [var-annotated]
+ ddtrace/llmobs/_integrations/crewai.py:449: error: Incompatible types (expression has type "Any | None", TypedDict item "span_id" has type "str") [typeddict-item]
+ ddtrace/llmobs/_integrations/crewai.py:465: error: Argument 2 to "get" of "dict" has incompatible type "list[Never]"; expected "bool" [arg-type]
+ ddtrace/llmobs/_integrations/claude_agent_sdk.py:102: error: Need type annotation for "tool_input" [var-annotated]
+ ddtrace/llmobs/_integrations/claude_agent_sdk.py:159: error: Need type annotation for "tools" [var-annotated]
+ ddtrace/llmobs/_integrations/claude_agent_sdk.py:162: error: Need type annotation for "mcp_servers" [var-annotated]
+ ddtrace/llmobs/_integrations/claude_agent_sdk.py:175: error: Need type annotation for "message" [var-annotated]
+ ddtrace/appsec/_api_security/api_manager.py:198: error: Incompatible types in assignment (expression has type "object", target has type "dict[str, bool]") [assignment]
+ ddtrace/appsec/_processor.py:282: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ ddtrace/appsec/_processor.py:282: note: Possible overload variants:
+ ddtrace/appsec/_processor.py:282: note: def get(self, Never, /) -> None
+ ddtrace/appsec/_processor.py:282: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/appsec/_processor.py:293: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ ddtrace/appsec/_processor.py:293: note: Possible overload variants:
+ ddtrace/appsec/_processor.py:293: note: def get(self, Never, /) -> None
+ ddtrace/appsec/_processor.py:293: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/llmobs/_integrations/litellm.py:129: error: Need type annotation for "litellm_params" [var-annotated]
- ddtrace/internal/ci_visibility/recorder.py:491: note: def get(self, Any, Any, /) -> Any
- ddtrace/internal/ci_visibility/recorder.py:517: note: def get(self, Any, Any, /) -> Any
- ddtrace/internal/ci_visibility/recorder.py:525: note: def get(self, Any, Any, /) -> Any
- ddtrace/internal/ci_visibility/recorder.py:533: note: def get(self, Any, Any, /) -> Any
+ ddtrace/appsec/ai_guard/integrations/strands.py:124: error: Need type annotation for "content" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock.py:88: error: Need type annotation for "tool_config" [var-annotated]
+ ddtrace/llmobs/_integrations/bedrock.py:93: error: Argument 1 to "_extract_input_message_for_converse" of "BedrockIntegration" has incompatible type "Any | str"; expected "list[dict[str, Any]]" [arg-type]
+ ddtrace/llmobs/_integrations/bedrock.py:250: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ ddtrace/llmobs/_integrations/bedrock.py:250: note: Possible overload variants:
+ ddtrace/llmobs/_integrations/bedrock.py:250: note: def get(self, Never, /) -> None
+ ddtrace/llmobs/_integrations/bedrock.py:250: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/appsec/_contrib/flask/__init__.py:74: error: Item "str" of "Any | str" has no attribute "seekable" [union-attr]
+ ddtrace/appsec/_contrib/flask/__init__.py:84: error: Item "str" of "Any | str" has no attribute "read" [union-attr]
+ ddtrace/appsec/_contrib/flask/__init__.py:88: error: Item "str" of "Any | str" has no attribute "read" [union-attr]
+ ddtrace/appsec/_contrib/flask/__init__.py:112: error: Item "str" of "Any | str" has no attribute "seek" [union-attr]
+ ddtrace/debugging/_probe/remoteconfig.py:214: error: No overload variant of "get" of "dict" matches argument types "str", "float" [call-overload]
+ ddtrace/debugging/_probe/remoteconfig.py:214: note: Possible overload variants:
+ ddtrace/debugging/_probe/remoteconfig.py:214: note: def get(self, Never, /) -> None
+ ddtrace/debugging/_probe/remoteconfig.py:214: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/appsec/ai_guard/integrations/litellm.py:115: error: Need type annotation for "function_info" [var-annotated]
+ ddtrace/appsec/ai_guard/integrations/litellm.py:248: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ ddtrace/appsec/ai_guard/integrations/litellm.py:248: note: Possible overload variants:
+ ddtrace/appsec/ai_guard/integrations/litellm.py:248: note: def get(self, Never, /) -> None
+ ddtrace/appsec/ai_guard/integrations/litellm.py:248: note: def [_T] get(self, Never, _T, /) -> _T
+ ddtrace/appsec/_iast/taint_sinks/command_injection.py:30: error: Need type annotation for "shell_args" [var-annotated]
starlette (https://github.com/encode/starlette)
- starlette/requests.py:146: error: Returning Any from function declared to return "dict[str, Any]" [no-any-return]
+ starlette/responses.py:265: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ starlette/responses.py:265: note: Possible overload variants:
+ starlette/responses.py:265: note: def get(self, Never, /) -> None
+ starlette/responses.py:265: note: def [_T] get(self, Never, _T, /) -> _T
- tests/test_datastructures.py:171: note: def get(self, str, str, /) -> str
- tests/test_datastructures.py:287: note: def get(self, str, str, /) -> str
- tests/test_datastructures.py:371: note: def get(self, str, UploadFile | str, /) -> UploadFile | str
- tests/test_datastructures.py:406: note: def get(self, Any, Any, /) -> Any
+ starlette/testclient.py:653: error: Need type annotation for "headers" [var-annotated]
+ starlette/templating.py:47: error: Need type annotation for "request" [var-annotated]
+ starlette/templating.py:48: error: Need type annotation for "extensions" [var-annotated]
scrapy (https://github.com/scrapy/scrapy)
+ scrapy/core/http2/stream.py:185: error: Incompatible return value type (got "Any | Literal[0] | bool", expected "bool") [return-value]
materialize (https://github.com/MaterializeInc/materialize)
+ misc/python/materialize/build_config.py:68: error: Need type annotation for "existing" [var-annotated]
+ misc/python/materialize/build_config.py:72: error: Need type annotation for "existing" [var-annotated]
+ misc/python/materialize/build_config.py:77: error: Need type annotation for "existing" [var-annotated]
+ misc/python/materialize/build_config.py:81: error: Need type annotation for "existing" [var-annotated]
+ misc/python/materialize/linear.py:113: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ misc/python/materialize/linear.py:113: note: Possible overload variants:
+ misc/python/materialize/linear.py:113: note: def get(self, Never, /) -> None
+ misc/python/materialize/linear.py:113: note: def [_T] get(self, Never, _T, /) -> _T
+ misc/python/materialize/cargo.py:60: error: Need type annotation for "features" [var-annotated]
+ misc/python/materialize/workload_replay/executor.py:316: error: Need type annotation for "settings" [var-annotated]
pylint (https://github.com/pycqa/pylint)
+ pylint/config/utils.py:52: error: Argument "action" to "_StoreTrueArgument" has incompatible type "Any | str"; expected "Literal['store_true']" [arg-type]
+ pylint/config/utils.py:74: error: Argument "action" to "_ExtendArgument" has incompatible type "Any | str"; expected "Literal['extend']" [arg-type]
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/core/jsonschema/references.py: note: In function "_sanitize_properties":
+ src/schemathesis/core/jsonschema/references.py:179: error: Need type annotation for "required" [var-annotated]
+ src/schemathesis/specs/openapi/serialization.py: note: In function "_serialize_openapi3":
+ src/schemathesis/specs/openapi/serialization.py:56: error: Need type annotation for "schema" [var-annotated]
+ src/schemathesis/specs/openapi/serialization.py: note: In function "_build_urlencoded_serializer":
+ src/schemathesis/specs/openapi/serialization.py:130: error: Need type annotation for "schema" [var-annotated]
+ src/schemathesis/specs/openapi/serialization.py:131: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/serialization.py:132: error: Need type annotation for "encoding" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/base_paths.py: note: In function "base_path_v3":
+ src/schemathesis/specs/openapi/adapter/base_paths.py:18: error: Need type annotation for "servers" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/base_paths.py:29: error: Need type annotation for "variables" [var-annotated]
+ src/schemathesis/transport/serialization.py: note: In function "_get_xml_tag":
+ src/schemathesis/transport/serialization.py:162: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ src/schemathesis/transport/serialization.py:162: note: Possible overload variants:
+ src/schemathesis/transport/serialization.py:162: note: def get(self, Never, /) -> None
+ src/schemathesis/transport/serialization.py:162: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/transport/serialization.py: note: In function "_write_object":
+ src/schemathesis/transport/serialization.py:214: error: Need type annotation for "options" [var-annotated]
+ src/schemathesis/transport/serialization.py:226: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/transport/serialization.py:228: error: Need type annotation for "property_schema" [var-annotated]
+ src/schemathesis/transport/serialization.py:232: error: Need type annotation for "child_options" [var-annotated]
+ src/schemathesis/transport/serialization.py: note: In function "_write_array":
+ src/schemathesis/transport/serialization.py:278: error: Need type annotation for "options" [var-annotated]
+ src/schemathesis/transport/serialization.py:298: error: Need type annotation for "child_options" [var-annotated]
+ src/schemathesis/transport/serialization.py: note: In function "_write_primitive":
+ src/schemathesis/transport/serialization.py:316: error: Need type annotation for "xml_options" [var-annotated]
+ src/schemathesis/specs/openapi/converter.py: note: In function "rewrite_properties":
+ src/schemathesis/specs/openapi/converter.py:447: error: Need type annotation for "required" [var-annotated]
+ src/schemathesis/specs/openapi/negative/value_channel.py: note: In function "collect_value_targets":
+ src/schemathesis/specs/openapi/negative/value_channel.py:127: error: Need type annotation for "properties_schema" [var-annotated]
+ src/schemathesis/specs/openapi/negative/mutations.py: note: In function "_synthesize_property_name":
+ src/schemathesis/specs/openapi/negative/mutations.py:373: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/negative/mutations.py: note: In function "remove_required_property":
+ src/schemathesis/specs/openapi/negative/mutations.py:706: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py: note: In function "_with_effective_required":
+ src/schemathesis/specs/openapi/coverage/_schema.py:693: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py: note: In function "_cover_positive_for_type":
+ src/schemathesis/specs/openapi/coverage/_schema.py:829: error: Need type annotation for "parent_props" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py:830: error: Need type annotation for "parent_required_raw" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py:832: error: Need type annotation for "branch_props" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py:833: error: Need type annotation for "branch_required_raw" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py:897: error: Item "NotSet" of "Any | NotSet" has no attribute "__iter__" (not iterable) [union-attr]
+ src/schemathesis/specs/openapi/coverage/_schema.py: note: In function "cover_schema_iter":
+ src/schemathesis/specs/openapi/coverage/_schema.py:1365: error: Need type annotation for "required" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py: note: In function "_get_template_schema":
+ src/schemathesis/specs/openapi/coverage/_schema.py:1587: error: Need type annotation for "required" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py: note: In function "_get_not_schema":
+ src/schemathesis/specs/openapi/coverage/_schema.py:1618: error: Need type annotation for "not_schema" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_schema.py: note: In function "_positive_object":
+ src/schemathesis/specs/openapi/coverage/_schema.py:2032: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/responses.py: note: In member "headers" of class "OpenApiResponse":
+ src/schemathesis/specs/openapi/adapter/responses.py:151: error: Need type annotation for "headers" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/responses.py: note: In function "extract_raw_response_schema_v3":
+ src/schemathesis/specs/openapi/adapter/responses.py:322: error: Need type annotation for "content" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/responses.py: note: In function "extract_header_schema_v3":
+ src/schemathesis/specs/openapi/adapter/responses.py:600: error: Need type annotation for "schema" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/responses.py: note: In function "iter_response_examples_v2":
+ src/schemathesis/specs/openapi/adapter/responses.py:613: error: Need type annotation for "examples" [var-annotated]
+ src/schemathesis/config/_projects.py: note: In member "get" of class "ProjectsConfig":
+ src/schemathesis/config/_projects.py:567: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ src/schemathesis/config/_projects.py:567: note: Possible overload variants:
+ src/schemathesis/config/_projects.py:567: note: def get(self, Never, /) -> None
+ src/schemathesis/config/_projects.py:567: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/pytest/xdist.py: note: In function "_serialize_writer_config":
+ src/schemathesis/pytest/xdist.py:268: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ src/schemathesis/pytest/xdist.py:268: note: Possible overload variants:
+ src/schemathesis/pytest/xdist.py:268: note: def get(self, Never, /) -> None
+ src/schemathesis/pytest/xdist.py:268: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/specs/openapi/adapter/parameters.py: note: In member "_get_strategy_examples" of class "OpenApiComponent":
+ src/schemathesis/specs/openapi/adapter/parameters.py:495: error: Argument 1 to "append" of "list" has incompatible type "Any | NotSet"; expected "JsonValue" [arg-type]
+ src/schemathesis/specs/openapi/adapter/parameters.py:501: error: Argument 1 to "append" of "list" has incompatible type "Any | NotSet"; expected "JsonValue" [arg-type]
+ src/schemathesis/specs/openapi/adapter/parameters.py: note: In member "get_property_content_type" of class "OpenApiBody":
+ src/schemathesis/specs/openapi/adapter/parameters.py:647: error: Need type annotation for "encoding" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/parameters.py:648: error: Need type annotation for "property_encoding" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/parameters.py: note: In member "get_property_filename" of class "OpenApiBody":
+ src/schemathesis/specs/openapi/adapter/parameters.py:653: error: Need type annotation for "encoding" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/parameters.py:654: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/schemathesis/specs/openapi/adapter/parameters.py:654: note: Possible overload variants:
+ src/schemathesis/specs/openapi/adapter/parameters.py:654: note: def get(self, Never, /) -> None
+ src/schemathesis/specs/openapi/adapter/parameters.py:654: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/specs/openapi/adapter/parameters.py: note: At top level:
+ src/schemathesis/specs/openapi/adapter/parameters.py: note: In function "_validated_parameters":
+ src/schemathesis/specs/openapi/adapter/parameters.py:924: error: Need type annotation for "parameters" [var-annotated]
+ src/schemathesis/pytest/plugin.py: note: In function "_open_writers":
+ src/schemathesis/pytest/plugin.py:523: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ src/schemathesis/pytest/plugin.py:523: note: Possible overload variants:
+ src/schemathesis/pytest/plugin.py:523: note: def get(self, Never, /) -> None
+ src/schemathesis/pytest/plugin.py:523: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/specs/openapi/_hypothesis.py: note: In function "_build_form_strategy_with_encoding":
+ src/schemathesis/specs/openapi/_hypothesis.py:487: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/_hypothesis.py:518: error: Need type annotation for "prop_schema" [var-annotated]
+ src/schemathesis/specs/openapi/_hypothesis.py: note: At top level:
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py: note: In function "resolve_all_refs":
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:39: error: Need type annotation for "bundled" [var-annotated]
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py: note: In function "unwrap_schema":
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:231: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:238: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:238: note: Possible overload variants:
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:238: note: def get(self, Never, /) -> None
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:238: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py: note: In function "_detect_hal_embedded":
+ src/schemathesis/specs/openapi/stateful/dependencies/schemas.py:302: error: Need type annotation for "embedded_properties" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/security.py: note: In function "get_security_requirements":
+ src/schemathesis/specs/openapi/adapter/security.py:263: error: Need type annotation for "requirements" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/security.py: note: In function "extract_security_definitions_v3":
+ src/schemathesis/specs/openapi/adapter/security.py:302: error: Need type annotation for "components" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/security.py:303: error: Need type annotation for "security_schemes" [var-annotated]
+ src/schemathesis/specs/openapi/adapter/formdata.py: note: In function "prepare_multipart_v3":
+ src/schemathesis/specs/openapi/adapter/formdata.py:57: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ src/schemathesis/specs/openapi/adapter/formdata.py:57: note: Possible overload variants:
+ src/schemathesis/specs/openapi/adapter/formdata.py:57: note: def get(self, Never, /) -> None
+ src/schemathesis/specs/openapi/adapter/formdata.py:57: note: def [_T] get(self, Never, _T, /) -> _T
+ src/schemathesis/specs/openapi/checks.py: note: In function "_single_element_array_becomes_valid_after_serialization":
+ src/schemathesis/specs/openapi/checks.py:394: error: Need type annotation for "schema" [var-annotated]
+ src/schemathesis/specs/openapi/checks.py: note: In function "_has_serialization_sensitive_types":
+ src/schemathesis/specs/openapi/checks.py:818: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/examples.py: note: In function "_yield_examples_per_branch":
+ src/schemathesis/specs/openapi/examples.py:731: error: Need type annotation for "branch_own" [var-annotated]
+ src/schemathesis/specs/openapi/examples.py: note: In function "extract_from_schema":
+ src/schemathesis/specs/openapi/examples.py:781: error: Need type annotation for "properties_to_process" [var-annotated]
+ src/schemathesis/specs/openapi/stateful/dependencies/resources.py: note: In function "iter_resources_from_response":
+ src/schemathesis/specs/openapi/stateful/dependencies/resources.py:140: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/stateful/dependencies/resources.py: note: In function "_recover_ref_from_allof":
+ src/schemathesis/specs/openapi/stateful/dependencies/resources.py:273: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/stateful/dependencies/resources.py:278: error: Need type annotation for "original_properties" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_operation.py: note: In function "_generate_multipart_body_from_custom_strategies":
+ src/schemathesis/specs/openapi/coverage/_operation.py:266: error: Need type annotation for "schema" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_operation.py:267: error: Need type annotation for "properties" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_operation.py:268: error: Need type annotation for "required" [var-annotated]
+ src/schemathesis/specs/openapi/coverage/_operation.py:288: error: Need type annotation for "prop_schema" [var-annotated]
+ src/schemathesis/specs/openapi/schemas.py: note: In member "_parse_responses" of class "OpenApiSchema":
+ src/schemathesis/specs/openapi/schemas.py:691: error: Need type annotation for "responses" [var-annotated]
pydantic (https://github.com/pydantic/pydantic)
+ pydantic/v1/mypy.py:245: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ pydantic/v1/mypy.py:245: note: Possible overload variants:
+ pydantic/v1/mypy.py:245: note: def get(self, Never, /) -> None
+ pydantic/v1/mypy.py:245: note: def [_T] get(self, Never, _T, /) -> _T
+ pydantic/_internal/_generate_schema.py:705: error: Need type annotation for "metadata" [var-annotated]
+ pydantic/_internal/_generate_schema.py:842: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ pydantic/_internal/_generate_schema.py:842: note: Possible overload variants:
+ pydantic/_internal/_generate_schema.py:842: note: def get(self, Never, /) -> None
+ pydantic/_internal/_generate_schema.py:842: note: def [_T] get(self, Never, _T, /) -> _T
+ pydantic/mypy.py:241: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ pydantic/mypy.py:241: note: Possible overload variants:
+ pydantic/mypy.py:241: note: def get(self, Never, /) -> None
+ pydantic/mypy.py:241: note: def [_T] get(self, Never, _T, /) -> _T
scikit-build-core (https://github.com/scikit-build/scikit-build-core)
+ src/scikit_build_core/settings/skbuild_overrides.py:435: error: Need type annotation for "inherit1" [var-annotated]
+ src/scikit_build_core/settings/skbuild_overrides.py:447: error: Need type annotation for "inner" [var-annotated]
+ src/scikit_build_core/settings/skbuild_read_settings.py:208: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/scikit_build_core/settings/skbuild_read_settings.py:208: note: Possible overload variants:
+ src/scikit_build_core/settings/skbuild_read_settings.py:208: note: def get(self, Never, /) -> None
+ src/scikit_build_core/settings/skbuild_read_settings.py:208: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/settings/skbuild_read_settings.py:216: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/scikit_build_core/settings/skbuild_read_settings.py:216: note: Possible overload variants:
+ src/scikit_build_core/settings/skbuild_read_settings.py:216: note: def get(self, Never, /) -> None
+ src/scikit_build_core/settings/skbuild_read_settings.py:216: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/settings/skbuild_read_settings.py:234: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/scikit_build_core/settings/skbuild_read_settings.py:234: note: Possible overload variants:
+ src/scikit_build_core/settings/skbuild_read_settings.py:234: note: def get(self, Never, /) -> None
+ src/scikit_build_core/settings/skbuild_read_settings.py:234: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/builder/get_requires.py:83: error: Argument 2 to "get" of "_Environ" has incompatible type "str"; expected "bool | None" [arg-type]
+ src/scikit_build_core/build/wheel.py:165: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ src/scikit_build_core/build/wheel.py:165: note: Possible overload variants:
+ src/scikit_build_core/build/wheel.py:165: note: def get(self, Never, /) -> None
+ src/scikit_build_core/build/wheel.py:165: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/build/__init__.py:78: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/scikit_build_core/build/__init__.py:78: note: Possible overload variants:
+ src/scikit_build_core/build/__init__.py:78: note: def get(self, Never, /) -> None
+ src/scikit_build_core/build/__init__.py:78: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/build/__main__.py:21: error: Need type annotation for "project" [var-annotated]
+ src/scikit_build_core/build/__main__.py:22: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ src/scikit_build_core/build/__main__.py:22: note: Possible overload variants:
+ src/scikit_build_core/build/__main__.py:22: note: def get(self, Never, /) -> None
+ src/scikit_build_core/build/__main__.py:22: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/build/__main__.py:37: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ src/scikit_build_core/build/__main__.py:37: note: Possible overload variants:
+ src/scikit_build_core/build/__main__.py:37: note: def get(self, Never, /) -> None
+ src/scikit_build_core/build/__main__.py:37: note: def [_T] get(self, Never, _T, /) -> _T
+ src/scikit_build_core/build/__main__.py:38: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ src/scikit_build_core/build/__main__.py:38: note: Possible overload variants:
+ src/scikit_build_core/build/__main__.py:38: note: def get(self, Never, /) -> None
+ src/scikit_build_core/build/__main__.py:38: note: def [_T] get(self, Never, _T, /) -> _T
+ tests/conftest.py:430: error: Need type annotation for "project" [var-annotated]
+ tests/conftest.py:432: error: Need type annotation for "pkgs" [var-annotated]
strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/channels/testing.py:73: error: Need type annotation for "subprotocols" [var-annotated]
typeshed-stats (https://github.com/AlexWaygood/typeshed-stats)
+ src/typeshed_stats/gather.py:431: error: Need type annotation for "stubtest_config" [var-annotated]
kopf (https://github.com/nolar/kopf)
+ kopf/_cogs/structs/bodies.py:249: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/structs/bodies.py:249: note: Possible overload variants:
+ kopf/_cogs/structs/bodies.py:249: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/bodies.py:249: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/structs/bodies.py:250: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/structs/bodies.py:250: note: Possible overload variants:
+ kopf/_cogs/structs/bodies.py:250: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/bodies.py:250: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/structs/bodies.py:251: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/structs/bodies.py:251: note: Possible overload variants:
+ kopf/_cogs/structs/bodies.py:251: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/bodies.py:251: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/structs/bodies.py:276: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/structs/bodies.py:276: note: Possible overload variants:
+ kopf/_cogs/structs/bodies.py:276: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/bodies.py:276: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/structs/bodies.py:277: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/structs/bodies.py:277: note: Possible overload variants:
+ kopf/_cogs/structs/bodies.py:277: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/bodies.py:277: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/structs/finalizers.py:14: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ kopf/_cogs/structs/finalizers.py:14: note: Possible overload variants:
+ kopf/_cogs/structs/finalizers.py:14: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/finalizers.py:14: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/structs/finalizers.py:21: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ kopf/_cogs/structs/finalizers.py:21: note: Possible overload variants:
+ kopf/_cogs/structs/finalizers.py:21: note: def get(self, Never, /) -> None
+ kopf/_cogs/structs/finalizers.py:21: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/configs/conventions.py:70: error: Need type annotation for "owners" [var-annotated]
+ kopf/_cogs/configs/diffbase.py:78: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ kopf/_cogs/configs/diffbase.py:78: note: Possible overload variants:
+ kopf/_cogs/configs/diffbase.py:78: note: def get(self, Never, /) -> None
+ kopf/_cogs/configs/diffbase.py:78: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_core/actions/loggers.py:132: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_core/actions/loggers.py:132: note: Possible overload variants:
+ kopf/_core/actions/loggers.py:132: note: def get(self, Never, /) -> None
+ kopf/_core/actions/loggers.py:132: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_core/actions/loggers.py:133: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_core/actions/loggers.py:133: note: Possible overload variants:
+ kopf/_core/actions/loggers.py:133: note: def get(self, Never, /) -> None
+ kopf/_core/actions/loggers.py:133: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_core/actions/loggers.py:134: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_core/actions/loggers.py:134: note: Possible overload variants:
+ kopf/_core/actions/loggers.py:134: note: def get(self, Never, /) -> None
+ kopf/_core/actions/loggers.py:134: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/clients/patching.py:96: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/clients/patching.py:96: note: Possible overload variants:
+ kopf/_cogs/clients/patching.py:96: note: def get(self, Never, /) -> None
+ kopf/_cogs/clients/patching.py:96: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_cogs/clients/patching.py:125: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_cogs/clients/patching.py:125: note: Possible overload variants:
+ kopf/_cogs/clients/patching.py:125: note: def get(self, Never, /) -> None
+ kopf/_cogs/clients/patching.py:125: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:139: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ kopf/_kits/hierarchies.py:139: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:139: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:139: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:196: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ kopf/_kits/hierarchies.py:196: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:196: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:196: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:267: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ kopf/_kits/hierarchies.py:267: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:267: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:267: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:276: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ kopf/_kits/hierarchies.py:276: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:276: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:276: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:306: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ kopf/_kits/hierarchies.py:306: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:306: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:306: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:307: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ kopf/_kits/hierarchies.py:307: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:307: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:307: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_kits/hierarchies.py:308: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ kopf/_kits/hierarchies.py:308: note: Possible overload variants:
+ kopf/_kits/hierarchies.py:308: note: def get(self, Never, /) -> None
+ kopf/_kits/hierarchies.py:308: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_core/intents/registries.py:454: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ kopf/_core/intents/registries.py:454: note: Possible overload variants:
+ kopf/_core/intents/registries.py:454: note: def get(self, Never, /) -> None
+ kopf/_core/intents/registries.py:454: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_core/intents/registries.py:465: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ kopf/_core/intents/registries.py:465: note: Possible overload variants:
+ kopf/_core/intents/registries.py:465: note: def get(self, Never, /) -> None
+ kopf/_core/intents/registries.py:465: note: def [_T] get(self, Never, _T, /) -> _T
+ kopf/_core/reactor/observation.py:349: error: Need type annotation for "conditions" [var-annotated]
+ kopf/_core/engines/indexing.py:233: error: Need type annotation for "meta" [var-annotated]
spack (https://github.com/spack/spack)
+ lib/spack/spack/util/environment.py:848: error: Need type annotation for "exclude" [var-annotated]
+ lib/spack/spack/util/environment.py:849: error: Need type annotation for "include" [var-annotated]
+ lib/spack/spack/mirrors/mirror.py:308: error: Need type annotation for "value" [var-annotated]
+ lib/spack/spack/fetch_strategy.py:353: error: Need type annotation for "mirrors" [var-annotated]
+ lib/spack/spack/compilers/libraries.py:204: error: Need type annotation for "compiler_flags" [var-annotated]
+ lib/spack/spack/store.py:74: error: Need type annotation for "install_tree" [var-annotated]
+ lib/spack/spack/detection/test.py:129: error: Need type annotation for "tests_by_path" [var-annotated]
+ lib/spack/spack/solver/requirements.py:292: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ lib/spack/spack/solver/requirements.py:292: note: Possible overload variants:
+ lib/spack/spack/solver/requirements.py:292: note: def get(self, Never, /) -> None
+ lib/spack/spack/solver/requirements.py:292: note: def [_T] get(self, Never, _T, /) -> _T
+ lib/spack/spack/solver/requirements.py:299: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ lib/spack/spack/solver/requirements.py:299: note: Possible overload variants:
+ lib/spack/spack/solver/requirements.py:299: note: def get(self, Never, /) -> None
+ lib/spack/spack/solver/requirements.py:299: note: def [_T] get(self, Never, _T, /) -> _T
+ lib/spack/spack/build_environment.py:1076: error: Need type annotation for "external_env" [var-annotated]
+ lib/spack/spack/environment/environment.py:2617: error: Need type annotation for "default_include" [var-annotated]
+ lib/spack/spack/environment/environment.py:2618: error: Need type annotation for "default_exclude" [var-annotated]
+ lib/spack/spack/solver/reuse.py:240: error: Need type annotation for "default_include" [var-annotated]
+ lib/spack/spack/solver/reuse.py:241: error: Need type annotation for "default_exclude" [var-annotated]
+ lib/spack/spack/solver/reuse.py:281: error: No overload variant of "__add__" of "str" matches argument type "list[Spec]" [operator]
+ lib/spack/spack/solver/reuse.py:281: note: Error code "operator" not covered by "type: ignore[type-var]" comment
+ lib/spack/spack/solver/reuse.py:281: note: Possible overload variants:
+ lib/spack/spack/solver/reuse.py:281: note: def __add__(self, str, /) -> str
+ lib/spack/spack/solver/reuse.py:281: note: Left operand is of type "Any | str | list[Any]"
+ lib/spack/spack/installer.py:2620: error: Need type annotation for "unmodified_env" [var-annotated]
pip (https://github.com/pypa/pip)
+ src/pip/_internal/pyproject.py:106: error: Need type annotation for "backend_path" [var-annotated]
+ src/pip/_internal/models/link.py:298: error: Need type annotation for "hashes" [var-annotated]
+ src/pip/_internal/vcs/git.py:85: error: Need type annotation for "extra_environ" [var-annotated]
+ src/pip/_internal/cli/base_command.py:249: error: Argument 2 to "get" of "_Environ" has incompatible type "str"; expected "bool" [arg-type]
python-chess (https://github.com/niklasf/python-chess)
+ chess/engine.py:2212: error: Argument 2 to "get" of "dict" has incompatible type "int"; expec
... (truncated 1026 lines) ... |
Fixes #15500
I wanted to add a test, but I am not sure how to add a test that only runs with python 3.12+, which is required to check automatic inference behavior.