Skip first-use inference for dict value types#2698
Skip first-use inference for dict value types#2698grievejia wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary:
This is a proof-of-concept for addressing ~14,800 false positives across 67 packages caused by Pyrefly's first-use inference on empty dict value types.
Currently, when a user writes `d = {}` followed by `d["key"] = None`, Pyrefly infers the dict type as `dict[str, None]` based on the first value assigned. This causes false positives when subsequent assignments use different value types (e.g. `d["name"] = "alice"` is rejected because `str` is not assignable to `None`). This is extremely common in real-world Python code — config builders, accumulators, serializers, test setup code, etc.
The fix: for empty dict literals, only infer the key type from first use, while leaving the value type as `Any`. This is a one-line change in `dict_items_infer` — instead of creating a `PartialContained` type variable for the value, we use `Any` directly. The key type still benefits from first-use inference (e.g. `d["key"] = value` pins the key type to `str`).
Trade-off: we lose some precision on homogeneous dicts (e.g. `d = {}; d["a"] = 1; d["b"] = 2` was `dict[str, int]`, now `dict[str, Any]`). But this is a net win because the false positive rate on heterogeneous dicts vastly outweighs the precision loss on homogeneous ones.
Differential Revision: D95618922
|
@grievejia has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95618922. |
|
Diff from mypy_primer, showing the effect of this PR on open source code: trio (https://github.com/python-trio/trio)
- ERROR src/trio/_core/_tests/test_instrumentation.py:131:66-74: Argument `list[set[tuple[str, Task]] | tuple[str, Task] | tuple[str, None]]` is not assignable to parameter `template` with type `Iterable[set[tuple[str, Task | None]] | tuple[str, Task | None]]` in function `trio._core._tests.tutil.check_sequence_matches` [bad-argument-type]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ERROR ddtrace/llmobs/_experiment.py:879:77-96: Cannot set item in `dict[tuple[str, str], bool | dict[str, bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | float | int | list[bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | str]` [unsupported-operation]
- ERROR ddtrace/llmobs/_experiment.py:882:56-71: Cannot set item in `dict[tuple[str, str], bool | dict[str, bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | float | int | list[bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | str]` [unsupported-operation]
discord.py (https://github.com/Rapptz/discord.py)
- ERROR discord/app_commands/tree.py:1221:63-87: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace._get_resolved_items` [bad-argument-type]
+ ERROR discord/app_commands/tree.py:1221:63-87: Argument `dict[@_, Unknown] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace._get_resolved_items` [bad-argument-type]
- ERROR discord/app_commands/tree.py:1277:44-68: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
+ ERROR discord/app_commands/tree.py:1277:44-68: Argument `dict[@_, Unknown] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
- ERROR discord/interactions.py:353:32-56: Argument `dict[@_, @_] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
+ ERROR discord/interactions.py:353:32-56: Argument `dict[@_, Unknown] | ResolvedData` is not assignable to parameter `resolved` with type `ResolvedData` in function `discord.app_commands.namespace.Namespace.__init__` [bad-argument-type]
cloud-init (https://github.com/canonical/cloud-init)
- ERROR cloudinit/cmd/main.py:233:21-35: Object of class `bool` has no attribute `startswith` [missing-attribute]
- ERROR cloudinit/config/cc_mounts.py:198:24-25: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR cloudinit/distros/opensuse.py:267:29-49: Object of class `NoneType` has no attribute `split` [missing-attribute]
- ERROR cloudinit/distros/opensuse.py:271:37-59: `not in` is not supported between `Literal['openSUSE']` and `None` [not-iterable]
- ERROR cloudinit/distros/opensuse.py:272:37-55: `in` is not supported between `Literal['openSUSE']` and `None` [not-iterable]
- ERROR cloudinit/distros/ug_util.py:40:25-59: Object of class `NoneType` has no attribute `extend` [missing-attribute]
- ERROR cloudinit/distros/ug_util.py:42:25-59: Object of class `NoneType` has no attribute `append` [missing-attribute]
- ERROR cloudinit/netinfo.py:143:13-42: Object of class `bool` has no attribute `append`
- Object of class `str` has no attribute `append` [missing-attribute]
- ERROR cloudinit/netinfo.py:162:13-42: Object of class `bool` has no attribute `append`
- Object of class `str` has no attribute `append` [missing-attribute]
- ERROR cloudinit/netinfo.py:355:16-20: Returned type `dict[Unknown, dict[str, bool | list[dict[str, str | Unknown]] | list[Unknown] | str | Unknown]] | dict[Unknown, Unknown] | Unknown` is not assignable to declared return type `dict[str, dict[str, Interface]]` [bad-return]
- ERROR cloudinit/netinfo.py:376:12-16: Returned type `dict[Unknown, dict[str, bool | list[dict[str, str | Unknown]] | list[Unknown] | str | Unknown]] | dict[Unknown, Unknown] | Unknown` is not assignable to declared return type `dict[str, dict[str, Interface]]` [bad-return]
- ERROR cloudinit/sources/DataSourceAliYun.py:295:25-68: `bytes | Unknown` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
- ERROR cloudinit/sources/DataSourceAzure.py:790:13-47: Cannot index into `list[dict[Unknown, Unknown]]` [bad-index]
- ERROR cloudinit/sources/DataSourceAzure.py:1977:29-66: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceAzure.py:1979:29-33: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceAzure.py:1985:34-39: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceAzure.py:1990:30-55: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceAzure.py:1992:31-56: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceAzure.py:1998:35-65: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceAzure.py:2004:39-74: Cannot set item in `dict[str, list[dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceExoscale.py:106:25-42: `str | Unknown` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
- ERROR cloudinit/sources/DataSourceIBMCloud.py:265:17-44: Object of class `NoneType` has no attribute `upper` [missing-attribute]
- ERROR cloudinit/sources/DataSourceIBMCloud.py:266:16-42: Object of class `NoneType` has no attribute `upper` [missing-attribute]
- ERROR cloudinit/sources/DataSourceOpenNebula.py:239:32-34: Cannot set item in `dict[str, int]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceOpenNebula.py:255:36-38: Cannot set item in `dict[str, dict[str, Unknown]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceOpenNebula.py:290:32-41: Cannot set item in `dict[str, int]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceOpenNebula.py:454:46-456:10: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:338:21-37: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:338:21-48: `+=` is not supported between `bool` and `list[dict[str, bool | str]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:340:40-47: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:343:21-40: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:343:21-345:22: `+=` is not supported between `bool` and `tuple[str]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:347:43-80: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:351:25-41: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:351:25-52: `+=` is not supported between `bool` and `list[dict[str, str | Unknown]]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:353:44-51: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR cloudinit/sources/DataSourceScaleway.py:355:32-67: `dict[str, dict[str | Unknown | None, dict[str, bool]] | int]` is not assignable to attribute `_network_config` with type `str` [bad-assignment]
+ ERROR cloudinit/sources/DataSourceScaleway.py:355:32-67: `dict[str, dict[str | Unknown | None, Unknown] | int]` is not assignable to attribute `_network_config` with type `str` [bad-assignment]
- ERROR cloudinit/sources/helpers/openstack.py:321:28-33: `dict[Unknown, None]` is not assignable to TypedDict key `files` with type `int | str` [bad-typed-dict-key]
+ ERROR cloudinit/sources/helpers/openstack.py:321:28-33: `dict[Unknown, Unknown]` is not assignable to TypedDict key `files` with type `int | str` [bad-typed-dict-key]
- ERROR cloudinit/sources/helpers/vmware/imc/config_nic.py:107:39-46: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, bool] | dict[str, dict[Unknown, Unknown]] | dict[str, list[Unknown]] | dict[str, dict[str, Unknown]] | dict[str, Unknown] | dict[Unknown, Unknown]) [no-matching-overload]
- ERROR cloudinit/sources/helpers/vmware/imc/config_nic.py:129:29-70: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, dict[str, bool]]) [no-matching-overload]
- ERROR cloudinit/ssh_util.py:437:38-53: Object of class `NoneType` has no attribute `split` [missing-attribute]
- ERROR cloudinit/util.py:561:12-33: `in` is not supported between `Literal['sles']` and `None` [not-iterable]
- ERROR cloudinit/util.py:561:37-58: `in` is not supported between `Literal['suse']` and `None` [not-iterable]
- ERROR cloudinit/util.py:575:33-578:18: No matching overload found for function `re.match` called with arguments: (Literal['[^ ]+ \\((?P<codename>[^)]+)\\)'], str | Unknown | None) [no-matching-overload]
- ERROR cloudinit/util.py:2925:12-38: Object of class `NoneType` has no attribute `lower` [missing-attribute]
- ERROR tests/unittests/sources/test_exoscale.py:210:16-46: Object of class `NoneType` has no attribute `decode`
+ ERROR tests/unittests/sources/test_exoscale.py:210:16-46: Object of class `NoneType` has no attribute `decode` [missing-attribute]
- Object of class `str` has no attribute `decode` [missing-attribute]
- ERROR tests/unittests/sources/vmware/test_vmware_config_file.py:210:47-70: Object of class `NoneType` has no attribute `get`
- Object of class `bool` has no attribute `get` [missing-attribute]
- ERROR tests/unittests/sources/vmware/test_vmware_config_file.py:215:33-66: Object of class `NoneType` has no attribute `get`
- Object of class `bool` has no attribute `get` [missing-attribute]
- ERROR tests/unittests/sources/vmware/test_vmware_config_file.py:219:47-70: Object of class `NoneType` has no attribute `get`
- Object of class `bool` has no attribute `get` [missing-attribute]
- ERROR tests/unittests/sources/vmware/test_vmware_config_file.py:224:33-66: Object of class `NoneType` has no attribute `get`
- Object of class `bool` has no attribute `get` [missing-attribute]
- ERROR tests/unittests/sources/vmware/test_vmware_config_file.py:246:47-70: Object of class `NoneType` has no attribute `get`
- Object of class `bool` has no attribute `get` [missing-attribute]
- ERROR tests/unittests/sources/vmware/test_vmware_config_file.py:269:47-70: Object of class `NoneType` has no attribute `get`
- Object of class `bool` has no attribute `get` [missing-attribute]
- ERROR tests/unittests/test_helpers.py:21:60-62: Argument `dict[@_, @_]` is not assignable to parameter `paths` with type `Paths` in function `cloudinit.sources.DataSource.__init__` [bad-argument-type]
+ ERROR tests/unittests/test_helpers.py:21:60-62: Argument `dict[@_, Unknown]` is not assignable to parameter `paths` with type `Paths` in function `cloudinit.sources.DataSource.__init__` [bad-argument-type]
- ERROR tests/unittests/test_helpers.py:32:60-62: Argument `dict[@_, @_]` is not assignable to parameter `paths` with type `Paths` in function `cloudinit.sources.DataSource.__init__` [bad-argument-type]
+ ERROR tests/unittests/test_helpers.py:32:60-62: Argument `dict[@_, Unknown]` is not assignable to parameter `paths` with type `Paths` in function `cloudinit.sources.DataSource.__init__` [bad-argument-type]
core (https://github.com/home-assistant/core)
- ERROR homeassistant/components/ai_task/__init__.py:78:16-67: Cannot set item in `dict[Optional, Selector[Unknown]]` [unsupported-operation]
+ ERROR homeassistant/components/ai_task/__init__.py:78:16-67: Cannot set item in `dict[Optional, Unknown]` [unsupported-operation]
- ERROR homeassistant/components/application_credentials/__init__.py:144:16-27: Returned type `dict[Unknown | None, ClientCredential]` is not assignable to declared return type `dict[str, ClientCredential]` [bad-return]
+ ERROR homeassistant/components/application_credentials/__init__.py:144:16-27: Returned type `dict[Unknown | None, Unknown]` is not assignable to declared return type `dict[str, ClientCredential]` [bad-return]
- ERROR homeassistant/components/device_tracker/legacy.py:556:21-33: Object of class `timedelta` has no attribute `get` [missing-attribute]
- ERROR homeassistant/components/device_tracker/legacy.py:559:47-56: Argument `timedelta | Unknown` is not assignable to parameter `track_new` with type `bool` in function `DeviceTracker.__init__` [bad-argument-type]
- ERROR homeassistant/components/device_tracker/legacy.py:559:58-66: Argument `dict[Unknown, Unknown] | timedelta | Unknown` is not assignable to parameter `defaults` with type `dict[str, Any]` in function `DeviceTracker.__init__` [bad-argument-type]
- ERROR homeassistant/components/diagnostics/__init__.py:219:29-40: `list[dict[str, Any]]` is not assignable to TypedDict key `issues` with type `Mapping[str | None, dict[SetupPhases, float]] | Mapping[str, Any] | dict[str, dict[str, list[str] | str | None]] | dict[str, Any] | Manifest` [bad-typed-dict-key]
+ ERROR homeassistant/components/diagnostics/__init__.py:219:29-40: `list[dict[str, Any]]` is not assignable to TypedDict key `issues` with type `Mapping[str | None, dict[SetupPhases, float]] | Mapping[str, Any] | dict[str, Any] | dict[str, Unknown] | Manifest` [bad-typed-dict-key]
- ERROR homeassistant/components/ecobee/weather.py:207:51-79: Cannot set item in `dict[str, str | None]` [unsupported-operation]
- ERROR homeassistant/components/ecobee/weather.py:209:55-82: Cannot set item in `dict[str, str | None]` [unsupported-operation]
- ERROR homeassistant/components/ecobee/weather.py:211:52-76: Cannot set item in `dict[str, str | None]` [unsupported-operation]
- ERROR homeassistant/components/ecobee/weather.py:213:57-79: Cannot set item in `dict[str, str | None]` [unsupported-operation]
- ERROR homeassistant/components/forked_daapd/config_flow.py:98:25-30: Cannot set item in `dict[Optional, type[int] | type[str]]` [unsupported-operation]
+ ERROR homeassistant/components/forked_daapd/config_flow.py:98:25-30: Cannot set item in `dict[Optional, Unknown]` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `bool` and `str` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `bool` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `str` and `bool` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `str` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `None` and `bool` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `None` and `str` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:420:8-64: `>` is not supported between `None` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `bool` and `str` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `bool` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `str` and `bool` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `str` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `None` and `bool` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `None` and `str` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:430:8-62: `<` is not supported between `None` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `bool` and `str` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `bool` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `str` and `bool` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `str` and `None` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `None` and `bool` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `None` and `str` [unsupported-operation]
- ERROR homeassistant/components/gtfs/sensor.py:437:8-60: `<` is not supported between `None` and `None` [unsupported-operation]
- ERROR homeassistant/components/hue/v1/sensor_base.py:155:13-68: Object of class `NoneType` has no attribute `append` [missing-attribute]
- ERROR homeassistant/components/picnic/coordinator.py:148:37-48: Cannot set item in `dict[str, list[Unknown]]` [unsupported-operation]
- ERROR homeassistant/components/picnic/coordinator.py:151:30-51: No matching overload found for function `typing.MutableMapping.setdefault` called with arguments: (Literal['delivery_time'], dict[@_, @_]) [no-matching-overload]
- ERROR homeassistant/components/plex/server.py:366:13-67: Object of class `NoneType` has no attribute `setdefault` [missing-attribute]
- ERROR homeassistant/components/plex/server.py:485:17-71: Cannot set item in `None` [unsupported-operation]
- ERROR homeassistant/components/plex/server.py:508:21-42: `None` is not subscriptable [unsupported-operation]
- ERROR homeassistant/components/plex/server.py:509:21-36: Object of class `NoneType` has no attribute `get` [missing-attribute]
- ERROR homeassistant/components/plex/server.py:510:21-36: Object of class `NoneType` has no attribute `get` [missing-attribute]
- ERROR homeassistant/components/reolink/__init__.py:493:32-48: Cannot index into `dict[str, int]` [bad-index]
+ ERROR homeassistant/components/reolink/__init__.py:493:32-48: Cannot index into `dict[str, Unknown]` [bad-index]
- ERROR homeassistant/components/tts/__init__.py:414:22-65: `bool | str | Unknown` is not assignable to `str` [bad-assignment]
- ERROR homeassistant/components/websocket_api/commands.py:1136:27-62: Cannot set item in `dict[str, dict[str, bool | None]]` [unsupported-operation]
- ERROR homeassistant/loader.py:1504:15-17: Argument `dict[@_, @_]` is not assignable to parameter `cache` with type `_ResolveDependenciesCacheProtocol` in function `_resolve_integrations_dependencies` [bad-argument-type]
+ ERROR homeassistant/loader.py:1504:15-17: Argument `dict[@_, Unknown]` is not assignable to parameter `cache` with type `_ResolveDependenciesCacheProtocol` in function `_resolve_integrations_dependencies` [bad-argument-type]
tornado (https://github.com/tornadoweb/tornado)
- ERROR tornado/options.py:448:13-62: Object of class `NoneType` has no attribute `append` [missing-attribute]
- ERROR tornado/options.py:453:13-19: Object of class `NoneType` has no attribute `sort` [missing-attribute]
- ERROR tornado/options.py:454:27-28: Type `None` is not iterable [not-iterable]
- ERROR tornado/test/runtests.py:199:28-60: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR tornado/wsgi.py:152:31-38: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR tornado/wsgi.py:192:17-31: Object of class `str` has no attribute `append` [missing-attribute]
- ERROR tornado/wsgi.py:194:17-31: Object of class `str` has no attribute `append` [missing-attribute]
- ERROR tornado/wsgi.py:196:13-27: Object of class `str` has no attribute `append` [missing-attribute]
pandera (https://github.com/pandera-dev/pandera)
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `checks` with type `Check | list[Check | Hypothesis] | None` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `nullable` with type `bool` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `unique` with type `bool` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `coerce` with type `bool` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `required` with type `bool` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `name` with type `str | None` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `regex` with type `bool` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `title` with type `str | None` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `description` with type `str | None` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `metadata` with type `dict[Unknown, Unknown] | None` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/ibis/model.py:109:46-61: Unpacked keyword argument `str | type[Any] | Unknown` is not assignable to parameter `drop_invalid_rows` with type `bool` in function `pandera.api.ibis.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `checks` with type `Check | list[Check | Hypothesis] | None` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `parsers` with type `Parser | list[Parser] | None` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `nullable` with type `bool` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `unique` with type `bool` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `report_duplicates` with type `Literal['all', 'exclude_first', 'exclude_last']` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `coerce` with type `bool` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `required` with type `bool` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `name` with type `str | tuple[str, ...] | None` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `regex` with type `bool` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `title` with type `str | None` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `description` with type `str | None` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `metadata` with type `dict[Unknown, Unknown] | None` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:140:46-61: Unpacked keyword argument `DataType | ExtensionDtype | dtype | str | type[Any] | Any | None` is not assignable to parameter `drop_invalid_rows` with type `bool` in function `pandera.api.pandas.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:166:31-45: Unpacked keyword argument `Any | None` is not assignable to parameter `nullable` with type `bool` in function `pandera.api.dataframe.components.ComponentSchema.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:166:31-45: Unpacked keyword argument `Any | None` is not assignable to parameter `unique` with type `bool` in function `pandera.api.dataframe.components.ComponentSchema.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:166:31-45: Unpacked keyword argument `Any | None` is not assignable to parameter `report_duplicates` with type `Literal['all', 'exclude_first', 'exclude_last']` in function `pandera.api.dataframe.components.ComponentSchema.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:166:31-45: Unpacked keyword argument `Any | None` is not assignable to parameter `coerce` with type `bool` in function `pandera.api.dataframe.components.ComponentSchema.__init__` [bad-argument-type]
- ERROR pandera/api/pandas/model.py:166:31-45: Unpacked keyword argument `Any | None` is not assignable to parameter `drop_invalid_rows` with type `bool` in function `pandera.api.dataframe.components.ComponentSchema.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `checks` with type `Check | list[Check | Hypothesis] | None` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `nullable` with type `bool` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `unique` with type `bool` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `coerce` with type `bool` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `required` with type `bool` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `name` with type `str | None` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `regex` with type `bool` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `title` with type `str | None` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `description` with type `str | None` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `metadata` with type `dict[Unknown, Unknown] | None` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/polars/model.py:105:46-61: Unpacked keyword argument `str | type[Any] | Unknown | None` is not assignable to parameter `drop_invalid_rows` with type `bool` in function `pandera.api.polars.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pyspark/model.py:285:46-61: Unpacked keyword argument `Any | None` is not assignable to parameter `nullable` with type `bool` in function `pandera.api.pyspark.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pyspark/model.py:285:46-61: Unpacked keyword argument `Any | None` is not assignable to parameter `coerce` with type `bool` in function `pandera.api.pyspark.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pyspark/model.py:285:46-61: Unpacked keyword argument `Any | None` is not assignable to parameter `required` with type `bool` in function `pandera.api.pyspark.components.Column.__init__` [bad-argument-type]
- ERROR pandera/api/pyspark/model.py:285:46-61: Unpacked keyword argument `Any | None` is not assignable to parameter `regex` with type `bool` in function `pandera.api.pyspark.components.Column.__init__` [bad-argument-type]
bokeh (https://github.com/bokeh/bokeh)
- ERROR src/bokeh/core/property/container.py:198:32-34: Default `dict[@_, @_]` is not assignable to parameter `default` with type `IntrinsicType | UndefinedType | T` [bad-function-definition]
+ ERROR src/bokeh/core/property/container.py:198:32-34: Default `dict[@_, Unknown]` is not assignable to parameter `default` with type `IntrinsicType | UndefinedType | T` [bad-function-definition]
zulip (https://github.com/zulip/zulip)
- ERROR zerver/lib/integrations.py:142:13-81: Unpacked keyword argument `str | Any | None` is not assignable to parameter `image_name` with type `str` in function `FixturelessScreenshotConfig.__init__` [bad-argument-type]
werkzeug (https://github.com/pallets/werkzeug)
- ERROR tests/test_formparser.py:417:33-49: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR src/werkzeug/datastructures/structures.py:209:17-47: Object of class `NoneType` has no attribute `append` [missing-attribute]
mkdocs (https://github.com/mkdocs/mkdocs)
- ERROR mkdocs/tests/plugin_tests.py:211:74-76: Argument `dict[@_, @_]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_content` [bad-argument-type]
+ ERROR mkdocs/tests/plugin_tests.py:211:74-76: Argument `dict[@_, Unknown]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_content` [bad-argument-type]
- ERROR mkdocs/tests/plugin_tests.py:229:74-76: Argument `dict[@_, @_]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_content` [bad-argument-type]
+ ERROR mkdocs/tests/plugin_tests.py:229:74-76: Argument `dict[@_, Unknown]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_content` [bad-argument-type]
- ERROR mkdocs/tests/plugin_tests.py:238:65-67: Argument `dict[@_, @_]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_nav` [bad-argument-type]
+ ERROR mkdocs/tests/plugin_tests.py:238:65-67: Argument `dict[@_, Unknown]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_nav` [bad-argument-type]
- ERROR mkdocs/tests/plugin_tests.py:245:75-77: Argument `dict[@_, @_]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_read_source` [bad-argument-type]
+ ERROR mkdocs/tests/plugin_tests.py:245:75-77: Argument `dict[@_, Unknown]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_read_source` [bad-argument-type]
- ERROR mkdocs/tests/plugin_tests.py:252:57-59: Argument `dict[@_, @_]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_pre_build` [bad-argument-type]
+ ERROR mkdocs/tests/plugin_tests.py:252:57-59: Argument `dict[@_, Unknown]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_pre_build` [bad-argument-type]
- ERROR mkdocs/tests/plugin_tests.py:257:76-78: Argument `dict[@_, @_]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_markdown` [bad-argument-type]
+ ERROR mkdocs/tests/plugin_tests.py:257:76-78: Argument `dict[@_, Unknown]` is not assignable to parameter `config` with type `MkDocsConfig` in function `mkdocs.plugins.PluginCollection.on_page_markdown` [bad-argument-type]
zope.interface (https://github.com/zopefoundation/zope.interface)
- ERROR src/zope/interface/tests/test_declarations.py:2032:26-42: No matching overload found for function `unittest.case.TestCase.assertRaises` called with arguments: (type[TypeError], object) [no-matching-overload]
dedupe (https://github.com/dedupeio/dedupe)
- ERROR dedupe/training.py:222:9-21: Overload return type `dict[Predicate, frozenset[tuple[int, int]]]` is not assignable to implementation return type `dict[Predicate, frozenset[tuple[RecordID, RecordID]]]` [inconsistent-overload]
- ERROR dedupe/training.py:227:9-21: Overload return type `dict[Predicate, frozenset[tuple[str, str]]]` is not assignable to implementation return type `dict[Predicate, frozenset[tuple[RecordID, RecordID]]]` [inconsistent-overload]
prefect (https://github.com/PrefectHQ/prefect)
- ERROR src/integrations/prefect-aws/prefect_aws/plugins.py:42:32-45: Cannot set item in `dict[str, SSLContext]` [unsupported-operation]
- ERROR src/integrations/prefect-dask/prefect_dask/client.py:35:46-57: Cannot set item in `dict[str, Task[Ellipsis, Unknown]]` [unsupported-operation]
- ERROR src/integrations/prefect-dask/prefect_dask/client.py:45:45-55: Cannot set item in `dict[str, Task[Ellipsis, Unknown]]` [unsupported-operation]
- ERROR src/integrations/prefect-dask/prefect_dask/client.py:55:47-59: Cannot set item in `dict[str, Task[Ellipsis, Unknown]]` [unsupported-operation]
- ERROR src/integrations/prefect-dask/prefect_dask/client.py:65:42-49: Cannot set item in `dict[str, Task[Ellipsis, Unknown]]` [unsupported-operation]
- ERROR src/integrations/prefect-gcp/prefect_gcp/bigquery.py:1040:36-38: `dict[@_, @_]` is not assignable to attribute `_unique_cursors` with type `Never` [bad-assignment]
+ ERROR src/integrations/prefect-gcp/prefect_gcp/bigquery.py:1040:36-38: `dict[@_, Unknown]` is not assignable to attribute `_unique_cursors` with type `Never` [bad-assignment]
- ERROR src/integrations/prefect-gcp/prefect_gcp/workers/cloud_run_v2.py:326:21-38: Argument `list[dict[str, dict[str, Unknown] | str]]` is not assignable to parameter `iterable` with type `Iterable[dict[str, str | None]]` in function `list.extend` [bad-argument-type]
- ERROR src/integrations/prefect-gcp/prefect_gcp/workers/cloud_run_v2.py:333:36-335:22: `dict[str, Unknown]` is not assignable to TypedDict key with type `str | None` [bad-typed-dict-key]
- ERROR src/integrations/prefect-gcp/prefect_gcp/workers/cloud_run_v2.py:344:36-346:22: `dict[str, Unknown]` is not assignable to TypedDict key with type `str | None` [bad-typed-dict-key]
- ERROR src/integrations/prefect-snowflake/prefect_snowflake/database.py:163:36-38: `dict[@_, @_]` is not assignable to attribute `_unique_cursors` with type `Never` [bad-assignment]
+ ERROR src/integrations/prefect-snowflake/prefect_snowflake/database.py:163:36-38: `dict[@_, Unknown]` is not assignable to attribute `_unique_cursors` with type `Never` [bad-assignment]
- ERROR src/prefect/filesystems.py:707:32-45: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR src/prefect/server/database/_migrations/versions/postgresql/2022_07_25_214717_4ff2f2bf81f4_adds_block_type_slug.py:70:63-73: Argument `dict[str, str] | list[Unknown] | Unknown` is not assignable to parameter `block_schema_fields` with type `dict[str, Any] | None` in function `prefect.blocks.core.Block._calculate_schema_checksum` [bad-argument-type]
+ ERROR src/prefect/server/database/_migrations/versions/postgresql/2022_07_25_214717_4ff2f2bf81f4_adds_block_type_slug.py:70:63-73: Argument `dict[str, Unknown] | list[Unknown] | Unknown` is not assignable to parameter `block_schema_fields` with type `dict[str, Any] | None` in function `prefect.blocks.core.Block._calculate_schema_checksum` [bad-argument-type]
- ERROR src/prefect/server/database/_migrations/versions/sqlite/2022_07_25_142515_f335f9633eec_adds_block_type_slug.py:73:63-73: Argument `dict[str, str] | list[Unknown] | Unknown` is not assignable to parameter `block_schema_fields` with type `dict[str, Any] | None` in function `prefect.blocks.core.Block._calculate_schema_checksum` [bad-argument-type]
+ ERROR src/prefect/server/database/_migrations/versions/sqlite/2022_07_25_142515_f335f9633eec_adds_block_type_slug.py:73:63-73: Argument `dict[str, Unknown] | list[Unknown] | Unknown` is not assignable to parameter `block_schema_fields` with type `dict[str, Any] | None` in function `prefect.blocks.core.Block._calculate_schema_checksum` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `name` with type `str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `description` with type `str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `tags` with type `Iterable[str] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `version` with type `str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `cache_policy` with type `CachePolicy | type[NotSet]` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `cache_key_fn` with type `((TaskRunContext, dict[str, Any]) -> str | None) | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `cache_expiration` with type `timedelta | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `task_run_name` with type `(() -> str) | TaskRunNameCallbackWithParameters | str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `retries` with type `int | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `retry_delay_seconds` with type `((int) -> list[float]) | float | int | list[float] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `retry_jitter_factor` with type `float | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `persist_result` with type `bool | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `result_storage` with type `Path | WritableFileSystem | str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `result_serializer` with type `Serializer | str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `result_storage_key` with type `str | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `cache_result_in_memory` with type `bool` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `timeout_seconds` with type `float | int | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `log_prints` with type `bool | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `refresh_cache` with type `bool | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `on_completion` with type `list[(Task[Ellipsis, Any], TaskRun, State) -> Awaitable[None] | None] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `on_failure` with type `list[(Task[Ellipsis, Any], TaskRun, State) -> Awaitable[None] | None] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `on_running` with type `list[(Task[Ellipsis, Any], TaskRun, State) -> Awaitable[None] | None] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `on_rollback` with type `list[(Transaction) -> None] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `on_commit` with type `list[(Transaction) -> None] | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `retry_condition_fn` with type `((Task[Ellipsis, Any], TaskRun, State) -> Awaitable[bool] | bool) | None` in function `MaterializingTask.__init__` [bad-argument-type]
- ERROR src/prefect/tasks.py:2255:13-26: Unpacked keyword argument `object | Any` is not assignable to parameter `asset_deps` with type `list[Asset | str] | None` in function `MaterializingTask.__init__` [bad-argument-type]
httpx-caching (https://github.com/johtso/httpx-caching)
- ERROR httpx_caching/_policy.py:431:32-49: `>` is not supported between `None` and `Literal[0]` [unsupported-operation]
- ERROR httpx_caching/_policy.py:494:37-58: Cannot set item in `dict[Unknown, None]` [unsupported-operation]
sockeye (https://github.com/awslabs/sockeye)
- ERROR sockeye/inference.py:522:23-33: Cannot set item in `dict[str, SentenceId]` [unsupported-operation]
- ERROR sockeye/inference.py:525:34-57: Cannot set item in `dict[str, SentenceId]` [unsupported-operation]
- ERROR sockeye/inference.py:526:28-45: Cannot set item in `dict[str, SentenceId]` [unsupported-operation]
- ERROR sockeye/inference.py:534:42-47: Cannot set item in `dict[str, SentenceId]` [unsupported-operation]
- ERROR sockeye/inference.py:537:42-44: Cannot set item in `dict[str, SentenceId]` [unsupported-operation]
- ERROR sockeye/utils.py:443:27-31: Cannot set item in `dict[str, bool]` [unsupported-operation]
- ERROR sockeye/utils.py:445:27-39: Cannot set item in `dict[str, bool]` [unsupported-operation]
paasta (https://github.com/yelp/paasta)
- ERROR paasta_tools/cli/cmds/spark_run.py:656:46-56: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR paasta_tools/kubernetes_tools.py:819:35-85: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, int | list[dict[str, int | str]] | str] | dict[Unknown, Unknown] | None) [no-matching-overload]
+ ERROR paasta_tools/kubernetes_tools.py:819:35-85: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, Unknown] | dict[Unknown, Unknown] | None) [no-matching-overload]
- ERROR paasta_tools/kubernetes_tools.py:2824:12-18: Returned type `dict[Unknown, str | None]` is not assignable to declared return type `Mapping[str, str]` [bad-return]
- ERROR paasta_tools/secret_tools.py:121:12-25: Returned type `dict[str, str | None]` is not assignable to declared return type `dict[str, str]` [bad-return]
pycryptodome (https://github.com/Legrandin/pycryptodome)
- ERROR lib/Crypto/SelfTest/Signature/test_dss.py:616:21-29: `dict[str, Det_DSA_Tests.setUp.TestKey]` is not assignable to attribute `keys` with type `list[tuple[str, str, str, str, str, str]]` [bad-assignment]
+ ERROR lib/Crypto/SelfTest/Signature/test_dss.py:616:21-29: `dict[str, Unknown]` is not assignable to attribute `keys` with type `list[tuple[str, str, str, str, str, str]]` [bad-assignment]
jax (https://github.com/google/jax)
- ERROR jax/_src/mesh.py:287:30-34: Cannot set item in `dict[tuple[tuple[Any, ...], tuple[Any, ...], tuple[Any, ...], Unknown], None]` [unsupported-operation]
- ERROR jax/_src/pallas/mosaic/lowering.py:1321:17-63: Expected a callable, got `T` [not-callable]
- ERROR jax/experimental/array_serialization/tensorstore_impl.py:298:23-35: `dict[str, str] | Unknown` is not assignable to TypedDict key `kvstore` with type `dict[str, dict[str, str] | str | Unknown | None]` [bad-typed-dict-key]
- ERROR jax/experimental/jax2tf/tests/sharding_test.py:202:37-82: Cannot set item in `dict[str, P]` [unsupported-operation]
- ERROR jax/experimental/jax2tf/tests/sharding_test.py:204:38-84: Cannot set item in `dict[str, P]` [unsupported-operation]
- ERROR jax/experimental/jax2tf/tests/sharding_test.py:205:20-41: No matching overload found for function `jax._src.api.jit` called with arguments: ((x: Unknown) -> Unknown, **dict[str, P]) [no-matching-overload]
- ERROR jax/experimental/jax2tf/tests/sharding_test.py:404:9-75: Cannot set item in `dict[str, NamedSharding]` [unsupported-operation]
- ERROR jax/experimental/jax2tf/tests/sharding_test.py:407:9-76: Cannot set item in `dict[str, NamedSharding]` [unsupported-operation]
- ERROR jax/experimental/jax2tf/tests/sharding_test.py:408:20-41: No matching overload found for function `jax._src.api.jit` called with arguments: ((x: Unknown) -> Unknown, **dict[str, NamedSharding]) [no-matching-overload]
optuna (https://github.com/optuna/optuna)
- ERROR optuna/testing/pytest_storages.py:1113:23-36: Argument `dict[str, CategoricalDistribution | FloatDistribution]` is not assignable to parameter `distributions` with type `dict[str, BaseDistribution]` in function `optuna.trial._frozen.FrozenTrial.__init__` [bad-argument-type]
pip (https://github.com/pypa/pip)
- ERROR src/pip/_vendor/distlib/util.py:606:61-77: Unpacked keyword argument `PycInvalidationMode` is not assignable to parameter `optimize` with type `int` in function `py_compile.compile` [bad-argument-type]
- ERROR src/pip/_vendor/distlib/util.py:606:61-77: Unpacked keyword argument `PycInvalidationMode` is not assignable to parameter `quiet` with type `int` in function `py_compile.compile` [bad-argument-type]
- ERROR src/pip/_vendor/distlib/util.py:1481:51-59: Unpacked keyword argument `str` is not assignable to parameter `server_side` with type `bool` in function `ssl.SSLContext.wrap_socket` [bad-argument-type]
- ERROR src/pip/_vendor/distlib/util.py:1481:51-59: Unpacked keyword argument `str` is not assignable to parameter `do_handshake_on_connect` with type `bool` in function `ssl.SSLContext.wrap_socket` [bad-argument-type]
- ERROR src/pip/_vendor/distlib/util.py:1481:51-59: Unpacked keyword argument `str` is not assignable to parameter `suppress_ragged_eofs` with type `bool` in function `ssl.SSLContext.wrap_socket` [bad-argument-type]
- ERROR src/pip/_vendor/distlib/util.py:1481:51-59: Unpacked keyword argument `str` is not assignable to parameter `session` with type `SSLSession | None` in function `ssl.SSLContext.wrap_socket` [bad-argument-type]
- ERROR src/pip/_vendor/pkg_resources/__init__.py:3037:50-71: Argument `dict[str | None, list[Unknown] | None]` is not assignable to parameter `dm` with type `dict[str | None, list[Requirement]]` in function `Distribution._filter_extras` [bad-argument-type]
- ERROR src/pip/_vendor/pkg_resources/__init__.py:3065:17-48: Object of class `NoneType` has no attribute `extend` [missing-attribute]
- ERROR src/pip/_vendor/pygments/sphinxext.py:192:13-50: Object of class `NoneType` has no attribute `append` [missing-attribute]
- ERROR src/pip/_vendor/pygments/sphinxext.py:210:25-31: Type `None` is not iterable [not-iterable]
- ERROR src/pip/_vendor/requests/utils.py:427:24-29: Cannot set item in `dict[str, None]` [unsupported-operation]
- ERROR src/pip/_vendor/requests/utils.py:544:16-39: Object of class `bool` has no attribute `strip` [missing-attribute]
pywin32 (https://github.com/mhammond/pywin32)
- ERROR adodbapi/test/test_adodbapi_dbapi20.py:45:33-51: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR win32/Demos/security/explicit_entries.py:73:42-43: Cannot set item in `dict[str, None]` [unsupported-operation]
- ERROR win32/Demos/security/explicit_entries.py:80:43-44: Cannot set item in `dict[str, None]` [unsupported-operation]
- ERROR win32/Demos/security/explicit_entries.py:83:29-42: Cannot set item in `dict[str, None]` [unsupported-operation]
- ERROR win32/Demos/security/explicit_entries.py:87:43-44: Cannot set item in `dict[str, None]` [unsupported-operation]
- ERROR win32/Demos/security/explicit_entries.py:90:29-36: Cannot set item in `dict[str, None]` [unsupported-operation]
- ERROR win32/Demos/security/explicit_entries.py:128:26-35: Argument `list[dict[str, dict[str, None] | int]]` is not assignable to parameter `obexpl_list` with type `tuple[dict[str, dict[str, PySID | int] | int], ...]` in function `_win32typing.PyACL.SetEntriesInAcl` [bad-argument-type]
+ ERROR win32/Demos/security/explicit_entries.py:128:26-35: Argument `list[dict[str, dict[str, Unknown] | int]]` is not assignable to parameter `obexpl_list` with type `tuple[dict[str, dict[str, PySID | int] | int], ...]` in function `_win32typing.PyACL.SetEntriesInAcl` [bad-argument-type]
- ERROR win32/Demos/security/explicit_entries.py:165:26-35: Argument `list[dict[str, dict[str, None] | int]]` is not assignable to parameter `obexpl_list` with type `tuple[dict[str, dict[str, PySID | int] | int], ...]` in function `_win32typing.PyACL.SetEntriesInAcl` [bad-argument-type]
+ ERROR win32/Demos/security/explicit_entries.py:165:26-35: Argument `list[dict[str, dict[str, Unknown] | int]]` is not assignable to parameter `obexpl_list` with type `tuple[dict[str, dict[str, PySID | int] | int], ...]` in function `_win32typing.PyACL.SetEntriesInAcl` [bad-argument-type]
artigraph (https://github.com/artigraph/artigraph)
- ERROR tests/arti/storage/test_local_storage.py:132:23-25: Argument `dict[@_, @_]` is not assignable to parameter `partition_key` with type `PartitionKey` in function `arti.storage.local.LocalFilePartition.__init__` [bad-argument-type]
+ ERROR tests/arti/storage/test_local_storage.py:132:23-25: Argument `dict[@_, Unknown]` is not assignable to parameter `partition_key` with type `PartitionKey` in function `arti.storage.local.LocalFilePartition.__init__` [bad-argument-type]
- ERROR tests/arti/storage/test_storage.py:49:70-72: Argument `dict[@_, @_]` is not assignable to parameter `partition_key` with type `PartitionKey` in function `MockStoragePartition.__init__` [bad-argument-type]
+ ERROR tests/arti/storage/test_storage.py:49:70-72: Argument `dict[@_, Unknown]` is not assignable to parameter `partition_key` with type `PartitionKey` in function `MockStoragePartition.__init__` [bad-argument-type]
meson (https://github.com/mesonbuild/meson)
- ERROR mesonbuild/backend/ninjabackend.py:2514:75-84: Unpacked keyword argument `bool` is not assignable to parameter `deps` with type `str | None` in function `NinjaRule.__init__` [bad-argument-type]
- ERROR mesonbuild/backend/ninjabackend.py:2514:75-84: Unpacked keyword argument `bool` is not assignable to parameter `depfile` with type `str | None` in function `NinjaRule.__init__` [bad-argument-type]
- ERROR mesonbuild/backend/ninjabackend.py:2514:75-84: Unpacked keyword argument `bool` is not assignable to parameter `rspfile_quote_style` with type `RSPFileSyntax` in function `NinjaRule.__init__` [bad-argument-type]
- ERROR mesonbuild/backend/ninjabackend.py:2521:75-84: Unpacked keyword argument `bool` is not assignable to parameter `deps` with type `str | None` in function `NinjaRule.__init__` [bad-argument-type]
- ERROR mesonbuild/backend/ninjabackend.py:2521:75-84: Unpacked keyword argument `bool` is not assignable to parameter `depfile` with type `str | None` in function `NinjaRule.__init__` [bad-argument-type]
- ERROR mesonbuild/backend/ninjabackend.py:2521:75-84: Unpacked keyword argument `bool` is not assignable to parameter `rspfile_quote_style` with type `RSPFileSyntax` in function `NinjaRule.__init__` [bad-argument-type]
- ERROR mesonbuild/mconf.py:197:30-48: No matching overload found for function `typing.MutableMapping.setdefault` called with arguments: (str | None, dict[@_, @_]) [no-matching-overload]
+ ERROR mesonbuild/mconf.py:197:30-48: No matching overload found for function `typing.MutableMapping.setdefault` called with arguments: (str | None, dict[@_, Unknown]) [no-matching-overload]
- ERROR mesonbuild/mconf.py:307:73-83: No matching overload found for function `dict.get` called with arguments: (None, dict[@_, @_]) [no-matching-overload]
+ ERROR mesonbuild/mconf.py:307:73-83: No matching overload found for function `dict.get` called with arguments: (None, dict[@_, Unknown]) [no-matching-overload]
- ERROR mesonbuild/mconf.py:309:62-72: No matching overload found for function `dict.get` called with arguments: (None, dict[@_, @_]) [no-matching-overload]
+ ERROR mesonbuild/mconf.py:309:62-72: No matching overload found for function `dict.get` called with arguments: (None, dict[@_, Unknown]) [no-matching-overload]
- ERROR mesonbuild/mintro.py:644:35-88: `list[str]` is not assignable to TypedDict key `error_list` with type `bool | dict[str, dict[str, int | str] | dict[str, dict[str, bool | str]]] | dict[str, int | str] | dict[str, str]` [bad-typed-dict-key]
+ ERROR mesonbuild/mintro.py:644:35-88: `list[str]` is not assignable to TypedDict key `error_list` with type `bool | dict[str, dict[str, int | str] | dict[str, Unknown]] | dict[str, int | str] | dict[str, str]` [bad-typed-dict-key]
scrapy (https://github.com/scrapy/scrapy)
- ERROR tests/test_feedexport.py:238:77-79: Argument `dict[@_, @_]` is not assignable to parameter `use_active_mode` with type `bool` in function `scrapy.extensions.feedexport.FTPFeedStorage.__init__` [bad-argument-type]
+ ERROR tests/test_feedexport.py:238:77-79: Argument `dict[@_, Unknown]` is not assignable to parameter `use_active_mode` with type `bool` in function `scrapy.extensions.feedexport.FTPFeedStorage.__init__` [bad-argument-type]
- ERROR tests/test_http_response.py:37:64-66: Argument `dict[@_, @_]` is not assignable to parameter `body` with type `bytes` in function `scrapy.http.response.Response.__init__` [bad-argument-type]
+ ERROR tests/test_http_response.py:37:64-66: Argument `dict[@_, Unknown]` is not assignable to parameter `body` with type `bytes` in function `scrapy.http.response.Response.__init__` [bad-argument-type]
- ERROR tests/test_utils_misc/__init__.py:38:25-27: Argument `dict[@_, @_]` is not assignable to parameter `path` with type `((...) -> Any) | str` in function `scrapy.utils.misc.load_object` [bad-argument-type]
+ ERROR tests/test_utils_misc/__init__.py:38:25-27: Argument `dict[@_, Unknown]` is not assignable to parameter `path` with type `((...) -> Any) | str` in function `scrapy.utils.misc.load_object` [bad-argument-type]
altair (https://github.com/vega/altair)
- ERROR altair/jupyter/jupyter_chart.py:266:60-268:30: Cannot set item in `dict[str | Unknown, IndexSelection]` [unsupported-operation]
- ERROR altair/jupyter/jupyter_chart.py:271:56-273:26: Cannot set item in `dict[str | Unknown, IndexSelection]` [unsupported-operation]
- ERROR altair/utils/_transformed_data.py:496:12-25: Returned type `dict[tuple[Unknown, tuple[*tuple[int, ...], int]], tuple[Unknown, tuple[int, ...]]]` is not assignable to declared return type `dict[tuple[str, tuple[int, ...]], tuple[str, tuple[int, ...]]]` [bad-return]
+ ERROR altair/utils/_transformed_data.py:496:12-25: Returned type `dict[tuple[Unknown, tuple[*tuple[int, ...], int]], Unknown]` is not assignable to declared return type `dict[tuple[str, tuple[int, ...]], tuple[str, tuple[int, ...]]]` [bad-return]
apprise (https://github.com/caronc/apprise)
- ERROR apprise/attachment/http.py:318:31-36: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR apprise/persistent_store.py:1706:20-29: Returned type `dict_keys[@_, @_]` is not assignable to declared return type `set[str]` [bad-return]
+ ERROR apprise/persistent_store.py:1706:20-29: Returned type `dict_keys[@_, Unknown]` is not assignable to declared return type `set[str]` [bad-return]
- ERROR apprise/plugins/notificationapi.py:717:28-56: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, dict[str, dict[@_, @_]]]) [no-matching-overload]
+ ERROR apprise/plugins/notificationapi.py:717:28-56: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, dict[str, dict[@_, Unknown]]]) [no-matching-overload]
- ERROR apprise/plugins/revolt.py:210:34-75: Cannot set item in `dict[str, list[dict[str, int | str | tuple[int, int, int] | Unknown | None]]]` [unsupported-operation]
- ERROR apprise/url.py:416:17-25: Unpacked keyword argument `bool` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
+ ERROR apprise/url.py:416:17-25: Unpacked keyword argument `bool | Unknown` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
- ERROR apprise/url.py:452:17-25: Unpacked keyword argument `bool` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
+ ERROR apprise/url.py:452:17-25: Unpacked keyword argument `bool | Unknown` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
- ERROR apprise/url.py:457:64-72: Unpacked keyword argument `bool` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
+ ERROR apprise/url.py:457:64-72: Unpacked keyword argument `bool | Unknown` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
- ERROR apprise/url.py:471:17-25: Unpacked keyword argument `bool` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
+ ERROR apprise/url.py:471:17-25: Unpacked keyword argument `bool | Unknown` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
- ERROR apprise/url.py:485:17-25: Unpacked keyword argument `bool` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
+ ERROR apprise/url.py:485:17-25: Unpacked keyword argument `bool | Unknown` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
- ERROR apprise/url.py:492:17-25: Unpacked keyword argument `bool` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
+ ERROR apprise/url.py:492:17-25: Unpacked keyword argument `bool | Unknown` is not assignable to parameter `string` with type `Buffer | None` in function `_hashlib.openssl_sha256` [bad-argument-type]
- ERROR tests/test_api.py:914:22-29: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | Unknown | None in function `apprise.url.URLBase.__init__` [bad-unpacking]
+ ERROR tests/test_api.py:914:22-29: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | Unknown | None in function `apprise.url.URLBase.__init__` [bad-unpacking]
- ERROR tests/test_api.py:928:22-29: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | Unknown | None in function `apprise.url.URLBase.__init__` [bad-unpacking]
+ ERROR tests/test_api.py:928:22-29: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | Unknown | None in function `apprise.url.URLBase.__init__` [bad-unpacking]
- ERROR tests/test_api.py:940:22-29: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | Unknown | None in function `apprise.url.URLBase.__init__` [bad-unpacking]
+ ERROR tests/test_api.py:940:22-29: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | Unknown | None in function `apprise.url.URLBase.__init__` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:821:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:821:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:827:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:827:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:844:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:844:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:854:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:854:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:871:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:871:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:887:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:887:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:905:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:905:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:915:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:915:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:934:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:934:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:946:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:946:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:957:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:957:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:976:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:976:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:994:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:994:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1005:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1005:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1016:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1016:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1023:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1023:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1033:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1033:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1043:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1043:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1056:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1056:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1071:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1071:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1079:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1079:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1088:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1088:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1100:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1100:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1112:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1112:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1125:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1125:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1142:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1142:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1173:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1173:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1180:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1180:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1204:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1204:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1209:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1209:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1218:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1218:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1226:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1226:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1235:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1235:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1246:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:1246:16-22: Argument `dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:1262:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
+ ERROR tests/test_apprise_utils.py:1262:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:1271:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
+ ERROR tests/test_apprise_utils.py:1271:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:1279:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
+ ERROR tests/test_apprise_utils.py:1279:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:1287:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
+ ERROR tests/test_apprise_utils.py:1287:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:1300:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
+ ERROR tests/test_apprise_utils.py:1300:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:1310:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, str | Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
+ ERROR tests/test_apprise_utils.py:1310:15-60: Expected argument after ** to be a mapping, got: dict[str, dict[Unknown, Unknown] | str | Unknown | None] | dict[str, Unknown] | None in function `apprise.utils.parse.url_assembly` [bad-unpacking]
- ERROR tests/test_apprise_utils.py:3091:42-44: Argument `dict[@_, @_]` is not assignable to parameter `data` with type `bytes` in function `apprise.utils.base64.base64_urlencode` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:3091:42-44: Argument `dict[@_, Unknown]` is not assignable to parameter `data` with type `bytes` in function `apprise.utils.base64.base64_urlencode` [bad-argument-type]
- ERROR tests/test_apprise_utils.py:3100:42-44: Argument `dict[@_, @_]` is not assignable to parameter `data` with type `str` in function `apprise.utils.base64.base64_urldecode` [bad-argument-type]
+ ERROR tests/test_apprise_utils.py:3100:42-44: Argument `dict[@_, Unknown]` is not assignable to parameter `data` with type `str` in function `apprise.utils.base64.base64_urldecode` [bad-argument-type]
|
Primer Diff Classification❌ 4 regression(s) | ✅ 21 improvement(s) | ➖ 2 neutral | 27 project(s) total 4 regression(s) across cloud-init, dedupe, artigraph, scrapy. error kinds:
Detailed analysis❌ Regression (4)cloud-init (+5, -45)
dedupe (-2)
artigraph (+2, -2)
scrapy (+3, -3)
✅ Improvement (21)trio (-1)
dd-trace-py (-2)
discord.py (+3, -3)
core (+6, -26)
tornado (-8)
pandera (-5)
bokeh (+1, -1)
zulip (-1)
werkzeug (-2)
zope.interface (-1)
prefect (+4, -14)
httpx-caching (-2)
The second error claimed assignment to
sockeye (-7)
paasta (+1, -4)
jax (-9)
optuna (-1)
pip (-8)
pywin32 (+2, -8)
meson (+4, -6)
altair (+1, -3)
apprise (+53, -55)
➖ Neutral (2)mkdocs (+6, -6)
pycryptodome (+1, -1)
Suggested FixSummary: The PR changed dict value type inference from first-use to Any, fixing ~14,800 false positives but introducing type inference failures producing Unknown/@_ types in 4 projects. 1. In
2. In
Was this helpful? React with 👍 or 👎 Classification by primer-classifier (1 heuristic, 26 LLM) |
Summary:
This is a proof-of-concept for addressing ~14,800 false positives across 67 packages caused by Pyrefly's first-use inference on empty dict value types.
Currently, when a user writes
d = {}followed byd["key"] = None, Pyrefly infers the dict type asdict[str, None]based on the first value assigned. This causes false positives when subsequent assignments use different value types (e.g.d["name"] = "alice"is rejected becausestris not assignable toNone). This is extremely common in real-world Python code — config builders, accumulators, serializers, test setup code, etc.The fix: for empty dict literals, only infer the key type from first use, while leaving the value type as
Any. This is a one-line change indict_items_infer— instead of creating aPartialContainedtype variable for the value, we useAnydirectly. The key type still benefits from first-use inference (e.g.d["key"] = valuepins the key type tostr).Trade-off: we lose some precision on homogeneous dicts (e.g.
d = {}; d["a"] = 1; d["b"] = 2wasdict[str, int], nowdict[str, Any]). But this is a net win because the false positive rate on heterogeneous dicts vastly outweighs the precision loss on homogeneous ones.Differential Revision: D95618922