Skip to content

Skip first-use inference for dict value types#2698

Open
grievejia wants to merge 1 commit intofacebook:mainfrom
grievejia:export-D95618922
Open

Skip first-use inference for dict value types#2698
grievejia wants to merge 1 commit intofacebook:mainfrom
grievejia:export-D95618922

Conversation

@grievejia
Copy link
Contributor

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

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
@meta-cla meta-cla bot added the cla signed label Mar 6, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 6, 2026

@grievejia has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95618922.

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

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]

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

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: bad-argument-type, bad-assignment, bad-index. caused by dict_items_infer(), mk_any_implicit(). 21 improvement(s) across trio, dd-trace-py, discord.py, core, tornado, pandera, bokeh, zulip, werkzeug, zope.interface, prefect, httpx-caching, sockeye, paasta, jax, optuna, pip, pywin32, meson, altair, apprise.

Project Verdict Changes Error Kinds Root Cause
trio ✅ Improvement -1 bad-argument-type dict_items_infer()
dd-trace-py ✅ Improvement -2 unsupported-operation dict_items_infer()
discord.py ✅ Improvement +3, -3 bad-argument-type dict_items_infer()
cloud-init ❌ Regression +5, -45 bad-argument-type, bad-assignment dict_items_infer()
core ✅ Improvement +6, -26 bad-argument-type, bad-assignment dict_items_infer()
tornado ✅ Improvement -8 missing-attribute, not-iterable dict_items_infer()
pandera ✅ Improvement -5 bad-argument-type pyrefly/lib/alt/expr.rs
bokeh ✅ Improvement +1, -1 bad-function-definition dict_items_infer()
zulip ✅ Improvement -1 bad-argument-type pyrefly/lib/alt/expr.rs
werkzeug ✅ Improvement -2 missing-attribute, unsupported-operation pyrefly/lib/alt/expr.rs
mkdocs ➖ Neutral +6, -6 bad-argument-type dict_items_infer()
zope.interface ✅ Improvement -1 no-matching-overload pyrefly/lib/alt/expr.rs
dedupe ❌ Regression -2 inconsistent-overload dict_items_infer()
prefect ✅ Improvement +4, -14 bad-argument-type, bad-assignment dict_items_infer()
httpx-caching ✅ Improvement -2 unsupported-operation dict_items_infer()
sockeye ✅ Improvement -7 unsupported-operation dict_items_infer()
paasta ✅ Improvement +1, -4 bad-return, no-matching-overload dict_items_infer()
pycryptodome ➖ Neutral +1, -1 bad-assignment
jax ✅ Improvement -9 bad-typed-dict-key, no-matching-overload dict_items_infer()
optuna ✅ Improvement -1 bad-argument-type pyrefly/lib/alt/expr.rs
pip ✅ Improvement -8 bad-argument-type, missing-attribute dict_items_infer()
pywin32 ✅ Improvement +2, -8 bad-argument-type, unsupported-operation dict_items_infer()
artigraph ❌ Regression +2, -2 bad-argument-type mk_any_implicit()
meson ✅ Improvement +4, -6 bad-argument-type, bad-typed-dict-key dict_items_infer()
scrapy ❌ Regression +3, -3 bad-argument-type dict_items_infer()
altair ✅ Improvement +1, -3 bad-return, unsupported-operation dict_items_infer()
apprise ✅ Improvement +53, -55 bad-argument-type dict_items_infer()
Detailed analysis

❌ Regression (4)

cloud-init (+5, -45)

This is a regression. While the PR successfully removed many false positives (45 removed errors were largely incorrect), it introduced new inference failures evidenced by Unknown and @_ types in error messages. The structural signal shows 2/5 new errors contain these problematic types, indicating the type checker is losing precision and failing to resolve types properly. The removed errors like 'Cannot set item in dict[str, str]' were clearly wrong since Python dicts are mutable. However, the new errors show the inference system struggling with basic type resolution, producing dict[@_, Unknown] and similar malformed types that suggest internal inference failures rather than real bugs in the cloud-init codebase.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. This removed false positives where pyrefly incorrectly locked dict value types based on first assignment, but introduced new inference failures producing Unknown/@_ types in some contexts.

dedupe (-2)

These were genuine type system violations being correctly flagged. The overload signatures declare return types like dict[Predicate, frozenset[tuple[int, int]]] but the implementation returns dict[Predicate, frozenset[tuple[RecordID, RecordID]]] where RecordID appears to be int | str. This violates overload consistency rules per the typing spec - each overload must be assignable to the implementation signature. Removing detection of this genuine inconsistency represents a loss of type safety.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs that now uses Any for dict value types appears unrelated to these overload consistency errors. The overload issue is about tuple element types in frozensets, not dict value inference. The removal of these errors may be an unintended side effect of other type inference changes.

artigraph (+2, -2)

This is a regression. The errors show dict[@_, Unknown] types, where @_ indicates a type inference failure. The code is passing empty dict literals ({}) as partition_key arguments to constructors in test files. This is valid Python code - empty dicts are legitimate arguments. The @_ type in the error message is a strong signal that pyrefly's type inference is failing, not that the code has a real bug. The PR changed dict inference to avoid @_ types but introduced Unknown types instead, which still represent inference issues rather than genuine type errors. The old dict[@_, @_] errors were also inference failures, just with different placeholder types.
Attribution: The change to dict_items_infer in pyrefly/lib/alt/expr.rs modified how empty dict literals are handled. Instead of creating a fresh_partial_contained type variable for values (which was producing @_ inference failures), it now uses mk_any_implicit() for the value type. This eliminated the @_ types but introduced Unknown types in the error messages.

scrapy (+3, -3)

This is a regression. While the PR was intended to fix false positives in dict value type inference, it introduced a degradation in type inference quality. The appearance of Unknown types in error messages (changing from dict[@_, @_] to dict[@_, Unknown]) indicates that pyrefly's type inference system is now producing less precise type information. The Unknown type suggests the type checker has lost the ability to properly track type variables in these contexts, which represents a step backward in inference capability. Both the old and new errors correctly identify that dict is not assignable to bool, but the new errors show evidence of inference failure.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs modified how empty dict literals are typed. Instead of creating type variables for both key and value types, it now uses Any for values, but this appears to be manifesting as Unknown in some contexts, indicating a type inference regression.

✅ Improvement (21)

trio (-1)

This removal represents an improvement. The error claimed that tuple[str, None] was not assignable to tuple[str, Task | None], but this is incorrect - since None is explicitly part of the union Task | None, the tuple types should be compatible. Looking at the code, line 92 creates tasks = {} which gets populated with task objects, and tasks.values() is passed to r.filter_tasks() and then to check_sequence_matches(). The PR's improvement to dict value type inference (using Any instead of first-use inference) resulted in more accurate type information flowing through this call chain, eliminating the false positive. The original error was pyrefly being overly strict about union type compatibility.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs that replaced first-use value type inference with Any for empty dict literals. This improved type inference for the tasks = {} dict on line 92, which gets populated with different value types (tasks['t1'] = task1, tasks['t2'] = task2). Better dict inference led to more accurate types flowing through tasks.values() and into the check_sequence_matches() call, resolving the false positive type mismatch.

dd-trace-py (-2)

The removed errors were false positives. Looking at the source code, flat_record is declared as dict[Union[str, tuple[str, str]], Any] on line 865. The assignments on lines 879 and 882 are setting items with tuple keys ("expected_output", expected_output_col) and ("expected_output", "") respectively, with values of type JSONType. Since JSONType is assignable to Any, these operations are perfectly valid. The old behavior was incorrectly inferring overly restrictive value types from first use, causing legitimate dict operations to be flagged as unsupported. The PR fix correctly uses Any for empty dict value types to avoid these false positives in heterogeneous dict usage patterns, which are extremely common in real Python code.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs modified empty dict literal inference to use Any for value types instead of creating a PartialContained type variable. This prevents the false positive unsupported-operation errors that occurred when the first assignment constrained the value type too narrowly.

discord.py (+3, -3)

The new errors contain @_ types (e.g., dict[@_, Unknown] | ResolvedData), which are strong indicators of type inference failures rather than real bugs. The PR description explains this is addressing ~14,800 false positives caused by overly strict first-use inference on empty dict value types. The removed errors show the same pattern with dict[@_, @_] types, confirming these were inference failures. The change from creating fresh type variables to using Any for empty dict value types eliminates these false positives while maintaining type safety - the code was always correct, pyrefly was just being too strict in its inference.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs modified empty dict literal inference to use Any for value types instead of creating fresh type variables. This eliminated the false positive type mismatches that were occurring when empty dicts were passed to functions expecting specific types.

core (+6, -26)

This is an improvement. The PR fixed a type inference issue where empty dict literals were producing Unknown types that caused false positive errors. The new errors still contain some Unknown types, but far fewer (6 new vs 26 removed), indicating the fix addressed most cases while some edge cases remain. The removed errors were clearly false positives - they flagged standard dict operations like d['key'] = value and d.get() with spurious Unknown type complaints. The code patterns are common in Python (config builders, data accumulation) and work correctly at runtime. Pyrefly's inference got more accurate by avoiding premature value type constraints on empty dicts.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs modified empty dict literal inference. Instead of creating a fresh_partial_contained type variable for values (which could resolve to Unknown), it now uses mk_any_implicit(), resulting in dict[KeyType, Any] instead of problematic Unknown types.

tornado (-8)

The removed errors were false positives caused by pyrefly's overly aggressive first-use inference on empty dict literals. When code like d = {}; d['key'] = None; d['name'] = 'alice' appeared, pyrefly would infer dict[str, None] from the first assignment and then incorrectly flag the string assignment as incompatible. The PR fixes this by using Any for value types in empty dict literals, which matches the more conservative approach of other type checkers and eliminates these false positives. The specific errors about str having no append attribute and NoneType having no append/sort attributes were downstream effects of this incorrect type inference propagating through the code.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. Instead of creating a fresh_partial_contained type variable for the value type, it now uses mk_any_implicit(), which prevents the overly restrictive type inference that caused these false positives.

pandera (-5)

These removed errors were false positives caused by pyrefly's overly aggressive first-use inference on empty dict literals. The PR description explains that pyrefly was inferring dict types like dict[str, None] from first assignments like d['key'] = None, then rejecting subsequent assignments with different value types. The pandera code constructs dictionaries of column properties by starting with empty dicts and progressively adding fields of different types - a common Python pattern. The Column constructors actually accept these arguments correctly; the issue was pyrefly's type inference being too narrow. The fix to use Any for dict value types (rather than inferring from first use) eliminates these false positives while maintaining type safety for the key types.
Attribution: The change to dict_items_infer in pyrefly/lib/alt/expr.rs replaced the fresh_partial_contained type variable for dict values with Any when no value hint is provided. This relaxed the inference from pinning value types on first use to using Any, which eliminated the false positive type mismatches in the unpacked keyword arguments.

bokeh (+1, -1)

This is an improvement. The error messages show type inference artifacts (@_ and Unknown types) rather than real type issues. Looking at the source code, line 198 shows default: Init[T] = {} in the Dict.__init__ method. This is valid Python code - an empty dict is a reasonable default value for a dict parameter. The old error claimed dict[@_, @_] was not assignable, while the new error claims dict[@_, Unknown] is not assignable, but both represent type inference failures rather than genuine type errors. The PR description explains this change was specifically made to reduce false positives in dict type inference. The @_ and Unknown types in the error messages are strong indicators of inference failures, not real bugs in the Bokeh codebase. Removing the false positive inference failure is an improvement in type checker accuracy.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs modified how empty dict literals are handled. Instead of creating a fresh partial contained type variable for the value type, it now uses mk_any_implicit(), which explains why the error message changed from dict[@_, @_] to dict[@_, Unknown].

zulip (-1)

This is an improvement. The removed error was a false positive caused by overly strict type inference on empty dict literals. The code at line 142 uses **vars(screenshot_config_option) to unpack object attributes into keyword arguments. While vars() can return values of type str | Any | None, the receiving FixturelessScreenshotConfig.__init__ method has default values for optional parameters, so None values would not actually be passed to parameters expecting str. The PR's change to use Any for empty dict value types eliminates this false positive while maintaining type safety for the key insight that this is a common and correct Python pattern.
Attribution: The change to dict_items_infer in pyrefly/lib/alt/expr.rs modified empty dict literal inference to use Any for value types instead of creating a PartialContained type variable. This relaxed the type inference, which eliminated the false positive where the dict's inferred value type was too restrictive.

werkzeug (-2)

Both removed errors were false positives caused by pyrefly's overly aggressive first-use inference on dict value types. The PR description explicitly states this addresses ~14,800 false positives across 67 packages caused by this exact pattern. The first error incorrectly inferred dict[str, str] when the WSGI environ should be dict[str, Any], then rejected assignment of a BytesIO object. The second error appears to be a cascade effect where incorrect dict typing led to incorrect inference of None instead of list. The fix correctly relaxes value type inference for empty dict literals while preserving key type inference, eliminating these false positives.
Attribution: The change to dict_items_infer in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. This fixed the false positive where pyrefly was inferring overly restrictive dict value types from first assignments, then rejecting subsequent assignments of different types.

zope.interface (-1)

The removed error was a false positive. Looking at the source code, foo is clearly defined as a function on lines 2027-2032 within the test_called_from_function method. The unittest.TestCase.assertRaises method has an overload that accepts (exception_type, callable, *args, **kwargs), and foo is a valid callable. The error incorrectly claimed no matching overload existed. The PR's changes to dict inference likely improved the type checker's ability to resolve overloads correctly, removing this false positive.
Attribution: The change to dict_items_infer in pyrefly/lib/alt/expr.rs modified how empty dict literals are handled. Instead of creating a PartialContained type variable for the value type that gets inferred from first use, it now uses Any directly. This change improved type inference for dict values, which likely had a cascading effect that fixed the false positive overload resolution error for assertRaises.

prefect (+4, -14)

This is an improvement. The PR author correctly identified that pyrefly's first-use inference for dict value types was causing ~14,800 false positives across 67 packages. The removed errors were false positives where pyrefly was being overly restrictive about dict value types based on first assignment. For example, code like d = {}; d['key'] = None; d['name'] = 'alice' would fail because pyrefly inferred dict[str, None] from the first assignment and then rejected the string assignment. The new errors show dict[@_, Unknown] and similar patterns, which are inference artifacts from the transition - these appear to be temporary issues as the type system adjusts to the new behavior. The trade-off of losing some precision on homogeneous dicts (now dict[str, Any] instead of dict[str, int]) is worthwhile given the massive reduction in false positives for the much more common heterogeneous dict pattern in real Python code.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. Instead of creating a PartialContained type variable for the value type (which would be constrained by the first assignment), pyrefly now uses mk_any_implicit() directly. This prevents the false positives that occurred when subsequent assignments used different value types than the first assignment.

httpx-caching (-2)

Both removed errors were false positives that pyrefly incorrectly flagged. The first error claimed cc["max-age"] > 0 is invalid because it involves comparing None with Literal[0], but this comparison is valid in Python - it returns False without raising an exception. Looking at the code, cc comes from parse_cache_control_directives() which returns a dict where values can be None or integers based on the parsing logic (lines 490-494). The comparison cc["max-age"] > 0 handles the case where max-age might be None gracefully.

The second error claimed assignment to dict[Unknown, None] is invalid, but this was due to pyrefly's overly restrictive first-use inference. The retval = {} on line 475 was being inferred as having None values after the first assignment retval[directive] = None on line 491, then subsequent assignments like retval[directive] = typ(parts[1].strip()) (which assigns an int) were rejected. The PR fix correctly addresses this by using Any for dict value types instead of inferring from first use, which matches how real Python code works - empty dicts commonly accumulate heterogeneous value types.

Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. This fixed the false positive on line 494 where retval (initialized as {}) was incorrectly inferred as dict[Unknown, None] instead of allowing flexible value types. The first error fix appears to be a side effect of improved type inference.

sockeye (-7)

The removed errors were false positives caused by overly aggressive type inference on empty dict literals. The code shows normal Python patterns where an empty dict _d = {} gets populated with heterogeneous values (floats, lists, strings). The old behavior inferred dict[str, SentenceId] from the first assignment _d['sentence_id'] = self.sentence_id, then incorrectly rejected subsequent assignments like _d['score'] = self.score (float) and _d['translations'] = self.nbest_translations (List[str]). This is a common pattern in config builders, serializers, and JSON construction code. The fix correctly allows heterogeneous dict values by using Any for the value type, eliminating ~14,800 false positives across 67 packages as mentioned in the PR description.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced the creation of a fresh_partial_contained type variable for dict values with mk_any_implicit(). This prevents pyrefly from inferring overly restrictive value types from the first dict assignment, eliminating the false positive unsupported-operation errors when subsequent assignments use different value types.

paasta (+1, -4)

This is an improvement. The PR description explicitly states this change addresses ~14,800 false positives across 67 packages caused by pyrefly's overly aggressive first-use inference on empty dict value types. The removed errors were false positives where pyrefly was incorrectly constraining dict value types based on the first assignment, then rejecting subsequent assignments with different but compatible types. For example, after d = {}; d['key'] = None, pyrefly would infer dict[str, None] and then reject d['name'] = 'alice' because str is not assignable to None. This pattern is extremely common in real Python code (config builders, accumulators, etc.) and the errors were incorrect. The new error that appeared is also a false positive - the MutableMapping.update call with dict[str, Unknown] | dict[Unknown, Unknown] | None should be valid, but pyrefly's type inference is producing Unknown types which suggests an inference issue rather than a real type error.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs caused these errors to disappear. Instead of creating a fresh partial contained type variable for dict values from empty literals, pyrefly now uses Any for the value type, which is much more permissive and eliminates the false positive errors that occurred when subsequent assignments used different value types than the first assignment.

jax (-9)

This is an improvement. The PR fixed a significant source of false positives in pyrefly's type inference. The old first-use inference for dict values was creating unresolvable type variables in complex scenarios, leading to Unknown types that caused cascading errors. The new approach using Any for empty dict values eliminates these false positives while maintaining practical usability. The trade-off of losing some precision on homogeneous dicts is justified by the elimination of widespread false positives in real-world code patterns.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. This eliminated the creation of PartialContained type variables that were failing to resolve in complex type contexts, removing the false positive Unknown type errors.

optuna (-1)

This removal represents an improvement. The error was a false positive caused by overly aggressive type inference on empty dict literals. The code creates a distributions dict with CategoricalDistribution | FloatDistribution values, which should be perfectly assignable to a parameter expecting dict[str, BaseDistribution] since both concrete distribution types inherit from BaseDistribution. The PR's change to use Any for empty dict value types prevents this incorrect inference that led to the false positive.
Attribution: The change to dict_items_infer in pyrefly/lib/alt/expr.rs modified how empty dict literals infer their value types. Instead of creating a PartialContained type variable that gets pinned to the first assigned value type, it now uses Any for the value type. This prevents the false positive where the inferred specific union type was incorrectly deemed incompatible with the broader base type.

pip (-8)

This is an improvement. Pyrefly's previous behavior was creating false positives by aggressively inferring dict value types from first assignment. Real Python code commonly uses patterns like d = {}; d['key'] = None; d['name'] = 'alice' where the dict holds heterogeneous values. The old inference would incorrectly constrain the dict to dict[str, None] and then flag subsequent string assignments as errors. The new behavior using Any for value types is more conservative and aligns with how mypy/pyright handle empty dict literals, eliminating these false positives while maintaining type safety for explicitly annotated dicts.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced aggressive partial type inference with Any for dict value types, directly eliminating these false positive error patterns.

pywin32 (+2, -8)

This is an improvement. The PR fixed a significant source of false positives in dict type inference. Looking at the code, we see the classic pattern that was causing issues: my_trustee = {} followed by my_trustee['MultipleTrustee'] = None and then my_trustee['MultipleTrusteeOperation'] = 0. The old inference would lock the value type to None after the first assignment, then complain when trying to assign an int (0) to the second key. The removed unsupported-operation errors were completely wrong - they claimed you cannot set items in a dict, which is false. The new bad-argument-type errors show the inference is now working better: instead of dict[str, None] (overly narrow), it's inferring dict[str, Unknown] which then gets converted to dict[str, Any] in the function signature matching. The Unknown in the error message indicates the dict values are now properly typed as Any rather than being incorrectly constrained to None. This change eliminates ~14,800 false positives across 67 packages according to the PR description, which is a substantial improvement in usability.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. Instead of creating a PartialContained type variable for values, it now uses self.heap.[mk_any_implicit()](https://github.com/facebook/pyrefly/blob/main/pyrefly/lib/alt/expr.rs), which prevents the false positive cascade where the first assignment locks in an overly narrow value type.

meson (+4, -6)

This is an improvement. The PR addresses a significant source of false positives (~14,800 across 67 packages) by changing how pyrefly infers types for empty dict literals. Previously, pyrefly would infer the dict value type from the first assignment (e.g., d = {}; d['key'] = Nonedict[str, None]), causing false positives when subsequent assignments used different types (d['name'] = 'alice' would fail because str is not assignable to None). The new behavior uses Any for the value type, matching the approach of mypy and pyright. The removed errors were false positives flagging common Python patterns like config builders and accumulators. The new errors show improved type inference - instead of inferring overly specific types like dict[str, @_] (which indicates inference failure), pyrefly now correctly infers dict[str, Any] and can properly validate method calls like setdefault().
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. Instead of creating a PartialContained type variable for the value type, it now uses self.heap.[mk_any_implicit()](https://github.com/facebook/pyrefly/blob/main/pyrefly/lib/alt/expr.rs) directly.

altair (+1, -3)

This is an improvement. The PR addresses a significant source of false positives in pyrefly's type inference. The removed unsupported-operation errors were incorrect - dict item assignment (dict[key] = value) is always supported regardless of the dict's type parameters. The change in the bad-return error shows the inference improvement: the old error showed dict[tuple[Unknown, tuple[*tuple[int, ...], int]], tuple[Unknown, tuple[int, ...]]] (with Unknown types indicating inference failures), while the new error shows dict[tuple[Unknown, tuple[*tuple[int, ...], int]], Unknown] (cleaner, with Unknown only in the value position where Any inference now applies). The trade-off of losing some precision on homogeneous dicts is worthwhile to eliminate the ~14,800 false positives mentioned in the PR description. The new behavior aligns better with how real Python code uses empty dict initialization followed by heterogeneous value assignment.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. This removed the false positive unsupported-operation errors by making dict value types more permissive, and changed the bad-return error by affecting how dict value types are inferred.

apprise (+53, -55)

bad-argument-type: These errors changed from overly specific inferred types (e.g., bool parameter) to more permissive types including Unknown, reducing false positive noise from first-use dict inference
bad-unpacking: Similar to bad-argument-type, these reflect the change from restrictive first-use inference to more permissive Any-based inference for dict values
bad-return: The return type error changed from dict_keys[@_, @_] to dict_keys[@_, Unknown], showing the inference change while maintaining the same underlying type issue
no-matching-overload: The overload matching changed due to dict value types becoming Any instead of overly specific inferred types, reducing false positive rejections
unsupported-operation: These were false positives removed - the operations on dict[str, str] are actually supported, and the errors were likely caused by overly restrictive type inference

Overall: This is an improvement. The PR addresses a significant source of false positives (~14,800 across 67 packages according to the description) by changing how pyrefly infers types for empty dict literals. The old behavior inferred value types from first use (e.g., d = {}; d['key'] = Nonedict[str, None]), which then rejected subsequent assignments with different types. The new behavior uses Any for value types, which is more practical for real-world Python code where dicts are commonly built incrementally with heterogeneous values. The removed errors were false positives flagging legitimate Python patterns, while the new errors show the same underlying issues but with more permissive Any types that don't create cascading false positives.

Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs replaced first-use value type inference with Any for empty dict literals. Instead of creating a PartialContained type variable for the value type, it now uses self.heap.[mk_any_implicit()](https://github.com/facebook/pyrefly/blob/main/pyrefly/lib/alt/expr.rs), which prevents the overly restrictive type inference that caused the false positives.

➖ Neutral (2)

mkdocs (+6, -6)

Both the old and new errors represent type inference failures rather than real bugs. The @_ symbols indicate unresolved type variables, and Unknown indicates untyped values. The test code config={} is valid Python - an empty dict can be passed to methods expecting config objects. The change from dict[@_, @_] to dict[@_, Unknown] shows the PR's modification working (value type is now Any/Unknown instead of a type variable), but the key type inference is still failing (@_). Since both error patterns represent inference failures on valid code, this is a lateral move in error quality rather than an improvement or regression.
Attribution: The change to dict_items_infer() in pyrefly/lib/alt/expr.rs modified how empty dict value types are inferred, changing from type variables to Any, which appears as Unknown in error messages

pycryptodome (+1, -1)

Same errors at same locations with same error kinds — message wording changed, no behavioral impact.

Suggested Fix

Summary: 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 dict_items_infer() in pyrefly/lib/alt/expr.rs, when using mk_any_implicit() for value types, ensure the resulting type is properly resolved in all contexts to avoid Unknown types appearing in error messages. Add a post-processing step to convert Any types to concrete types when sufficient context is available from assignments or function signatures.

Files: pyrefly/lib/alt/expr.rs
Confidence: medium
Affected projects: cloud-init, artigraph, scrapy
Fixes: bad-argument-type, bad-assignment
The regression shows Unknown types appearing in error messages across cloud-init, artigraph, and scrapy, indicating that mk_any_implicit() is not being properly resolved in some type inference contexts. This eliminates the Unknown type artifacts while preserving the false positive fixes.

2. In dict_items_infer() in pyrefly/lib/alt/expr.rs, add a heuristic to detect when empty dict literals are used in contexts where homogeneous value types are expected (e.g., function parameters with specific dict[K,V] annotations) and use the expected value type instead of Any in those cases.

Files: pyrefly/lib/alt/expr.rs
Confidence: low
Affected projects: dedupe
Fixes: bad-override
This would restore some type precision for cases like dedupe where overload consistency checking relies on specific value types, while maintaining the false positive fixes for heterogeneous dict usage patterns. However, this is complex to implement correctly and may reintroduce some false positives.


Was this helpful? React with 👍 or 👎

Classification by primer-classifier (1 heuristic, 26 LLM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant