Skip to content

fix handling of bool and abs values #924#2485

Open
asukaminato0721 wants to merge 1 commit intofacebook:mainfrom
asukaminato0721:924
Open

fix handling of bool and abs values #924#2485
asukaminato0721 wants to merge 1 commit intofacebook:mainfrom
asukaminato0721:924

Conversation

@asukaminato0721
Copy link
Contributor

@asukaminato0721 asukaminato0721 commented Feb 21, 2026

Summary

Fixes #924

Adjusted subtype checking so unbound type variables can widen across union members, which fixes generic calls like abs(x) on a union without forcing the first member’s specialization.

Test Plan

Added a regression test that asserts abs(bool|int|float|complex) yields int | float.

@meta-cla meta-cla bot added the cla signed label Feb 21, 2026
@github-actions

This comment has been minimized.

@asukaminato0721 asukaminato0721 marked this pull request as ready for review February 21, 2026 19:47
Copilot AI review requested due to automatic review settings February 21, 2026 19:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes #924 by adjusting subtype/inference behavior so unbound type variables can widen across union members, allowing calls like abs(x) where x is a union containing bool without pinning inference to the first union member.

Changes:

  • Add a regression test asserting abs(bool | int | float | complex) produces int | float.
  • Update subset checking for Union <: T to enable “union widening” of unbound quantified variables on the RHS across union members.
  • Adjust protocol attribute lookup to avoid eagerly expanding variables during protocol attribute instantiation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
pyrefly/lib/test/calls.rs Adds regression test for abs over a union containing bool.
pyrefly/lib/solver/subset.rs Wraps Union-LHS subset checks with a union-widening context for RHS quantified vars.
pyrefly/lib/solver/solver.rs Implements union-widening tracking in Subset and widens RHS var answers when later union members require it.
pyrefly/lib/alt/class/class_field.rs Adds an attribute-instantiation mode to avoid expanding vars for protocol attribute lookup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1774 to +1803
match self.is_subset_eq(t1, &t2) {
Ok(()) => Ok(()),
Err(err) => match self.union_widening_quantified(*v2) {
Some(q) => {
let t1_p = t1
.clone()
.promote_implicit_literals(self.type_order.stdlib());
let bound = q
.restriction()
.as_type(self.type_order.stdlib(), &self.solver.heap);
if let Err(err_p) = self.is_subset_eq(&t1_p, &bound) {
self.solver.instantiation_errors.write().insert(
*v2,
TypeVarSpecializationError {
name: q.name.clone(),
got: t1_p.clone(),
want: bound,
error: err_p,
},
);
}
let widened = unions(vec![t2, t1_p], &self.solver.heap);
self.solver
.variables
.lock()
.update(*v2, Variable::Answer(widened));
Ok(())
}
None => Err(err),
},
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the union-widening path for Variable::Answer(t2), any Err(err) from is_subset_eq(t1, &t2) is swallowed and converted into a widening update + Ok(()). This can accidentally mask non-subtyping failures (e.g. SubsetError::InternalError, TensorShape, protocol/attribute errors, or gas exhaustion), making the solver report success when it should surface the error. Consider only widening for “ordinary mismatch” errors (likely SubsetError::Other, possibly a small allowlist) and propagating structured errors unchanged.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

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

psycopg (https://github.com/psycopg/psycopg)
+ ERROR psycopg_pool/psycopg_pool/pool_async.py:708:20-53: Returned type `Awaitable[str] | str` is not assignable to declared return type `str` [bad-return]
+ ERROR psycopg_pool/psycopg_pool/pool_async.py:718:20-51: Returned type `Awaitable[dict[str, Any]] | dict[str, Any]` is not assignable to declared return type `dict[str, Any]` [bad-return]

colour (https://github.com/colour-science/colour)
- ERROR colour/algebra/common.py:221:31-35: Argument `Literal['Ignore', 'Ignore Limit Conversion', 'Ignore Zero Conversion', 'Numpy', 'Raise', 'Replace With Epsilon', 'Warning', 'Warning Limit Conversion', 'Warning Replace With Epsilon', 'Warning Zero Conversion'] | None` is not assignable to parameter `value` with type `Literal['Ignore'] | None` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/algebra/common.py:221:37-52: Argument `Literal['Ignore', 'Ignore Limit Conversion', 'Ignore Zero Conversion', 'Numpy', 'Raise', 'Replace With Epsilon', 'Warning', 'Warning Limit Conversion', 'Warning Replace With Epsilon', 'Warning Zero Conversion']` is not assignable to parameter `default` with type `Literal['Ignore']` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/models/rgb/rgb_colourspace.py:1058:13-23: Argument `Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | bytes | complex | str | None` is not assignable to parameter `value` with type `Buffer | None` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/models/rgb/rgb_colourspace.py:1192:13-23: Argument `Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | bytes | complex | str | None` is not assignable to parameter `value` with type `Buffer | None` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/plotting/volume.py:186:40-46: Argument `Buffer | Sequence[str] | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype[Any]]] | _SupportsArray[dtype[Any]] | bytes | complex | str | None` is not assignable to parameter `value` with type `Buffer | None` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/plotting/volume.py:186:48-58: Argument `tuple[Literal['x'], Literal['y']]` is not assignable to parameter `default` with type `Buffer` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/plotting/volume.py:752:47-59: Argument `RGB_Colourspace | Sequence[RGB_Colourspace | str] | str | None` is not assignable to parameter `value` with type `RGB_Colourspace | None` in function `colour.utilities.common.optional` [bad-argument-type]
- ERROR colour/plotting/volume.py:752:61-79: Argument `list[str]` is not assignable to parameter `default` with type `RGB_Colourspace` in function `colour.utilities.common.optional` [bad-argument-type]

cki-lib (https://gitlab.com/cki-project/cki-lib)
- ERROR tests/test_yaml.py:250:55-63: Argument `list[dict[str, dict[Unknown, Unknown] | str] | dict[str, dict[str, str]]] | list[dict[str, dict[str, str]] | int] | list[dict[str, dict[str, str]]] | list[int] | list[dict[str, dict[str, str] | dict[Unknown, Unknown]]] | list[Unknown]` is not assignable to parameter `iterable` with type `Iterable[dict[str, dict[Unknown, Unknown] | str] | dict[str, dict[str, str]]]` in function `enumerate.__new__` [bad-argument-type]

hydpy (https://github.com/hydpy-dev/hydpy)
- ERROR hydpy/auxs/calibtools.py:1754:9-17: Overload return type `Add | Multiply | MultiplyIUH | Replace | ReplaceIUH` is not assignable to implementation return type `Add | Multiply` [inconsistent-overload]
- ERROR hydpy/core/devicetools.py:2575:36-46: Argument `Literal['-', '--', '-.', ':', 'dashdot', 'dashed', 'dotted', 'solid'] | tuple[LineStyle, LineStyle] | None` is not assignable to parameter `x` with type `Literal['-'] | tuple[Literal['-'] | None, Literal['-'] | None] | None` in function `_make_tuple` [bad-argument-type]
- ERROR hydpy/core/devicetools.py:2758:36-46: Argument `Literal['-', '--', '-.', ':', 'dashdot', 'dashed', 'dotted', 'solid'] | tuple[LineStyle, LineStyle] | None` is not assignable to parameter `x` with type `Literal['-'] | tuple[Literal['-'] | None, Literal['-'] | None] | None` in function `_make_tuple` [bad-argument-type]
- ERROR hydpy/core/devicetools.py:3700:28-38: Argument `Literal['-', '--', '-.', ':', 'dashdot', 'dashed', 'dotted', 'solid'] | tuple[LineStyle, ...] | None` is not assignable to parameter `input_` with type `Literal['-'] | tuple[Literal['-'], ...] | None` in function `_prepare_tuple` [bad-argument-type]
- ERROR hydpy/core/objecttools.py:1771:32-38: Argument `tuple[type[T1]] | tuple[type[T1], type[T2]] | tuple[type[T1], type[T2], type[T3]]` is not assignable to parameter `values` with type `Iterable[type[T1]]` in function `enumeration` [bad-argument-type]
- ERROR hydpy/core/variabletools.py:2076:20-30: Argument `bool | float | int | ndarray[tuple[Any, ...], dtype[Any]]` is not assignable to parameter `x` with type `SupportsAbs[int]` in function `abs` [bad-argument-type]
- ERROR hydpy/exe/xmltools.py:2340:53-61: Argument `type[AddItem] | type[GetItem] | type[MultiplyItem] | type[SetItem]` is not assignable to parameter `itemtype` with type `type[AddItem]` in function `XMLVar._get_changeitem` [bad-argument-type]
+ ERROR hydpy/exe/xmltools.py:2340:36-62: `GetItem` is not assignable to upper bound `AddItem | MultiplyItem | SetItem` of type variable `_TypeSetOrAddOrMultiplyItem` [bad-specialization]

tornado (https://github.com/tornadoweb/tornado)
- ERROR tornado/gen.py:210:22-26: Argument `((...) -> Generator[Any, Any, _T]) | ((...) -> _T)` is not assignable to parameter `wrapped` with type `(...) -> Generator[Any, Any, _T]` in function `functools.wraps` [bad-argument-type]
- ERROR tornado/gen.py:221:30-34: Argument `((...) -> Generator[Any, Any, _T]) | ((...) -> _T)` is not assignable to parameter with type `(...) -> Generator[Any, Any, _T]` in function `_contextvars.Context.run` [bad-argument-type]
- ERROR tornado/gen.py:221:30-34: Argument `((...) -> Generator[Any, Any, _T]) | ((...) -> _T)` is not assignable to parameter `f` with type `(...) -> Generator[Any, Any, _T]` in function `_fake_ctx_run` [bad-argument-type]
- ERROR tornado/testing.py:600:26-30: Argument `((...) -> Future[Coroutine[Unknown, Unknown, Unknown] | Generator[Unknown, None, None]]) | ((self: Unknown, *args: Unknown, **kwargs: Unknown) -> Coroutine[Unknown, Unknown, Unknown] | Generator[Unknown, None, None])` is not assignable to parameter `wrapped` with type `(...) -> Future[Coroutine[Unknown, Unknown, Unknown] | Generator[Unknown, None, None]]` in function `functools.wraps` [bad-argument-type]
- ERROR tornado/testing.py:605:39-43: Argument `((...) -> Future[Coroutine[Unknown, Unknown, Unknown] | Generator[Unknown, None, None]]) | ((self: Unknown, *args: Unknown, **kwargs: Unknown) -> Coroutine[Unknown, Unknown, Unknown] | Generator[Unknown, None, None])` is not assignable to parameter `func` with type `(...) -> Future[Coroutine[Unknown, Unknown, Unknown] | Generator[Unknown, None, None]]` in function `functools.partial.__new__` [bad-argument-type]

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- ERROR tanjun/annotations.py:2689:5-24: Implementation signature `(command: _CommandUnionT | None = None, /, *, follow_wrapped: bool = False) -> ((_CommandUnionT) -> _CommandUnionT) | _CommandUnionT` does not accept all arguments that overload signature `(command: _CommandUnionT, /) -> _CommandUnionT` accepts [inconsistent-overload]
- ERROR tanjun/clients.py:793:34-45: Argument `type[Cache] | type[NoneType]` is not assignable to parameter `type_` with type `type[Cache]` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/clients.py:795:34-46: Argument `type[EventManager] | type[NoneType]` is not assignable to parameter `type_` with type `type[EventManager]` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/clients.py:797:34-46: Argument `type[InteractionServer] | type[NoneType]` is not assignable to parameter `type_` with type `type[InteractionServer]` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/clients.py:799:34-46: Argument `type[NoneType] | type[ShardAware]` is not assignable to parameter `type_` with type `type[NoneType]` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/clients.py:799:48-54: Argument `ShardAware | None` is not assignable to parameter `value` with type `NoneType | None` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/clients.py:801:34-45: Argument `type[NoneType] | type[VoiceComponent]` is not assignable to parameter `type_` with type `type[NoneType]` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/clients.py:801:47-52: Argument `VoiceComponent | None` is not assignable to parameter `value` with type `NoneType | None` in function `Client._maybe_set_type_dep` [bad-argument-type]
- ERROR tanjun/context/slash.py:637:45-55: Argument `BytesIO | PathLike[str] | Resource[Any] | StringIO | UndefinedType | bytearray | bytes | memoryview[int] | str` is not assignable to parameter `singular` with type `BytesIO | UndefinedType` in function `_to_list` [bad-argument-type]
- ERROR tanjun/context/slash.py:637:57-68: Argument `Sequence[Resourceish] | UndefinedType` is not assignable to parameter `plural` with type `Sequence[BytesIO] | UndefinedType` in function `_to_list` [bad-argument-type]

core (https://github.com/home-assistant/core)
- ERROR homeassistant/components/energy/websocket_api.py:88:22-26: Argument `((HomeAssistant, ActiveConnection, dict[str, Any], EnergyManager) -> Coroutine[Any, Any, None]) | ((HomeAssistant, ActiveConnection, dict[str, Any], EnergyManager) -> None)` is not assignable to parameter `wrapped` with type `(HomeAssistant, ActiveConnection, dict[str, Any], EnergyManager) -> Coroutine[Any, Any, None]` in function `functools.wraps` [bad-argument-type]
- ERROR homeassistant/components/imap/coordinator.py:218:34-55: Argument `Message[str, str] | list[Message[str, str] | str] | str | Any` is not assignable to parameter `iterable` with type `Iterable[str]` in function `enumerate.__new__` [bad-argument-type]
- ERROR homeassistant/components/knx/websocket.py:146:16-20: Argument `((HomeAssistant, KNXModule, ActiveConnection, dict[str, Any]) -> Awaitable[None]) | ((HomeAssistant, KNXModule, ActiveConnection, dict[str, Any]) -> None)` is not assignable to parameter `wrapped` with type `(HomeAssistant, KNXModule, ActiveConnection, dict[str, Any]) -> Awaitable[None]` in function `functools.wraps` [bad-argument-type]
- ERROR homeassistant/helpers/config_validation.py:351:5-16: Implementation signature `(value: _T | None) -> list[_T] | list[Any]` does not accept all arguments that overload signature `(value: list[_T] | _T) -> list[_T]` accepts [inconsistent-overload]
- ERROR homeassistant/helpers/entity_registry.py:1232:44-56: Argument `Mapping[str, Any] | UndefinedType | None` is not assignable to parameter `value` with type `Mapping[str, Any] | UndefinedType` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1233:47-62: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1234:50-68: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1239:47-62: Argument `EntityCategory | UndefinedType | None` is not assignable to parameter `value` with type `EntityCategory | UndefinedType` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1249:53-74: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1250:45-58: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1251:45-58: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1255:47-62: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/entity_registry.py:1257:51-70: Argument `UndefinedType | str | None` is not assignable to parameter `value` with type `UndefinedType | str` in function `none_if_undefined` [bad-argument-type]
- ERROR homeassistant/helpers/integration_platform.py:141:46-146:14: No matching overload found for function `homeassistant.core.HomeAssistant.async_run_hass_job` called with arguments: (HassJob[[HomeAssistant, str, Any], Awaitable[None] | None], HomeAssistant, str, ModuleType) [no-matching-overload]
- ERROR homeassistant/util/variance.py:41:43-61: Argument `float | int | timedelta` is not assignable to parameter `x` with type `SupportsAbs[float]` in function `abs` [bad-argument-type]

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ERROR ddtrace/llmobs/_experiment.py:1107:63-73: Argument `((dict[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], dict[str, bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | None) -> bool | dict[str, JSONType] | float | int | list[JSONType] | str | None) | ((dict[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], dict[str, bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | None) -> Awaitable[bool | dict[str, JSONType] | float | int | list[JSONType] | str | None])` is not assignable to parameter with type `(dict[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], dict[str, bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | None) -> bool | dict[str, JSONType] | float | int | list[JSONType] | str | None` in function `asyncio.threads.to_thread` [bad-argument-type]
+ ERROR ddtrace/llmobs/_experiment.py:1116:24-1132:18: Returned type `dict[str, Awaitable[bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | bool | dict[str, int | str] | dict[str, Unknown] | dict[str, JSONType] | float | int | list[JSONType] | str | Unknown | None]` is not assignable to declared return type `TaskResult | None` [bad-return]
+ ERROR ddtrace/llmobs/_experiment.py:1250:49-60: `Awaitable[EvaluatorResult | bool | dict[str, JSONType] | float | int | list[JSONType] | str | None] | bool | dict[str, JSONType] | float | int | list[JSONType] | str | Unknown | None` is not assignable to variable `eval_result_value` with type `bool | dict[str, JSONType] | float | int | list[JSONType] | str | None` [bad-assignment]

pydantic (https://github.com/pydantic/pydantic)
- ERROR pydantic/_internal/_mock_val_ser.py:137:25-142:6: `MockValSer[PluggableSchemaValidator]` is not assignable to attribute `validator` with type `PluggableSchemaValidator | SchemaValidator` [bad-assignment]
+ ERROR pydantic/_internal/_mock_val_ser.py:137:25-142:6: `MockValSer[PluggableSchemaValidator | SchemaValidator]` is not assignable to attribute `validator` with type `PluggableSchemaValidator | SchemaValidator` [bad-assignment]
- ERROR pydantic/_internal/_mock_val_ser.py:141:44-67: Argument `(ta: TypeAdapter[Unknown]) -> PluggableSchemaValidator | SchemaValidator` is not assignable to parameter `attr_fn` with type `(TypeAdapter[Unknown]) -> PluggableSchemaValidator | None` in function `attempt_rebuild_fn` [bad-argument-type]
- ERROR pydantic/_internal/_mock_val_ser.py:176:34-181:6: `MockValSer[PluggableSchemaValidator]` is not assignable to attribute `__pydantic_validator__` with type `PluggableSchemaValidator | SchemaValidator` [bad-assignment]
+ ERROR pydantic/_internal/_mock_val_ser.py:176:34-181:6: `MockValSer[PluggableSchemaValidator | SchemaValidator]` is not assignable to attribute `__pydantic_validator__` with type `PluggableSchemaValidator | SchemaValidator` [bad-assignment]
- ERROR pydantic/_internal/_mock_val_ser.py:180:44-78: Argument `(c: type[BaseModel]) -> PluggableSchemaValidator | SchemaValidator` is not assignable to parameter `attr_fn` with type `(type[BaseModel]) -> PluggableSchemaValidator | None` in function `attempt_rebuild_fn` [bad-argument-type]
- ERROR pydantic/_internal/_mock_val_ser.py:217:34-222:6: `MockValSer[PluggableSchemaValidator]` is not assignable to attribute `__pydantic_validator__` with type `PluggableSchemaValidator | SchemaValidator` [bad-assignment]
+ ERROR pydantic/_internal/_mock_val_ser.py:217:34-222:6: `MockValSer[PluggableSchemaValidator | SchemaValidator]` is not assignable to attribute `__pydantic_validator__` with type `PluggableSchemaValidator | SchemaValidator` [bad-assignment]
- ERROR pydantic/_internal/_mock_val_ser.py:221:44-78: Argument `(c: type[PydanticDataclass]) -> PluggableSchemaValidator | SchemaValidator` is not assignable to parameter `attr_fn` with type `(type[PydanticDataclass]) -> PluggableSchemaValidator | None` in function `attempt_rebuild_fn` [bad-argument-type]
- ERROR pydantic/functional_serializers.py:346:5-21: Overload return type `((Any) -> Any) | ((Any, SerializationInfo[Any]) -> Any)` is not assignable to implementation return type `(((Any) -> Any) -> (Any) -> Any) | (((Any, SerializationInfo[Any]) -> Any) -> (Any, SerializationInfo[Any]) -> Any) | ((Any) -> Any)` [inconsistent-overload]
- ERROR pydantic/functional_serializers.py:346:5-21: Overload signature `(f: _ModelPlainSerializerT, /) -> _ModelPlainSerializerT` is not consistent with implementation signature `(f: _ModelPlainSerializerT | _ModelWrapSerializerT | None = None, /, *, mode: Literal['plain', 'wrap'] = 'plain', when_used: WhenUsed = 'always', return_type: Any = ...) -> ((_ModelPlainSerializerT) -> _ModelPlainSerializerT) | ((_ModelWrapSerializerT) -> _ModelWrapSerializerT) | _ModelPlainSerializerT` [inconsistent-overload]

mypy_primer (https://github.com/hauntsaninja/mypy_primer)
- ERROR mypy_primer/main.py:448:35-39: Argument `Coroutine[Unknown, Unknown, int] | Coroutine[Unknown, Unknown, None]` is not assignable to parameter `main` with type `Coroutine[Any, Any, int]` in function `asyncio.runners.run` [bad-argument-type]

werkzeug (https://github.com/pallets/werkzeug)
- ERROR tests/test_test.py:336:23-49: Argument `dict[str, FileStorage | str]` is not assignable to parameter `mapping` with type `Iterable[tuple[str, FileStorage]] | Mapping[str, FileStorage | list[FileStorage] | set[FileStorage] | tuple[FileStorage, ...]] | MultiDict[str, FileStorage] | None` in function `werkzeug.datastructures.structures.MultiDict.__init__` [bad-argument-type]
- ERROR tests/test_test.py:363:19-34: Argument `dict[str, FileStorage | str]` is not assignable to parameter `mapping` with type `Iterable[tuple[str, FileStorage]] | Mapping[str, FileStorage | list[FileStorage] | set[FileStorage] | tuple[FileStorage, ...]] | MultiDict[str, FileStorage] | None` in function `werkzeug.datastructures.structures.MultiDict.__init__` [bad-argument-type]
- ERROR src/werkzeug/debug/repr.py:175:44-53: Argument `dict_items[int | str, int] | dict_items[int, None] | dict_items[str, int]` is not assignable to parameter `iterable` with type `Iterable[tuple[int | str, int]]` in function `enumerate.__new__` [bad-argument-type]

vision (https://github.com/pytorch/vision)
- ERROR torchvision/models/detection/anchor_utils.py:51:35-39: Argument `tuple[tuple[int, int, int] | Unknown] | tuple[int, int, int] | Unknown` is not assignable to parameter `scales` with type `list[int]` in function `AnchorGenerator.generate_anchors` [bad-argument-type]
+ ERROR torchvision/models/detection/anchor_utils.py:51:35-39: Argument `tuple[tuple[int, int, int] | Unknown] | tuple[int, int, int]` is not assignable to parameter `scales` with type `list[int]` in function `AnchorGenerator.generate_anchors` [bad-argument-type]
- ERROR torchvision/models/quantization/googlenet.py:139:13-146:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> GoogLeNet_QuantizedWeights | GoogLeNet_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> GoogLeNet_QuantizedWeights | None) | GoogLeNet_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/inception.py:199:13-206:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> Inception_V3_QuantizedWeights | Inception_V3_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> Inception_V3_QuantizedWeights | None) | Inception_V3_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/mobilenetv2.py:96:13-103:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> Literal[MobileNet_V2_Weights.IMAGENET1K_V1] | MobileNet_V2_QuantizedWeights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> MobileNet_V2_Weights | None) | MobileNet_V2_Weights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/mobilenetv3.py:191:13-198:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> Literal[MobileNet_V3_Large_Weights.IMAGENET1K_V1] | MobileNet_V3_Large_QuantizedWeights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> MobileNet_V3_Large_Weights | None) | MobileNet_V3_Large_Weights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/resnet.py:285:13-292:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> ResNet18_QuantizedWeights | ResNet18_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ResNet18_QuantizedWeights | None) | ResNet18_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/resnet.py:337:13-344:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> Literal[ResNet50_QuantizedWeights.IMAGENET1K_FBGEMM_V1, ResNet50_Weights.IMAGENET1K_V1]]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ResNet50_QuantizedWeights | None) | ResNet50_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/resnet.py:389:13-396:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> Literal[ResNeXt101_32X8D_QuantizedWeights.IMAGENET1K_FBGEMM_V1, ResNeXt101_32X8D_Weights.IMAGENET1K_V1]]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ResNeXt101_32X8D_QuantizedWeights | None) | ResNeXt101_32X8D_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/resnet.py:443:13-450:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> ResNeXt101_64X4D_QuantizedWeights | ResNeXt101_64X4D_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ResNeXt101_64X4D_QuantizedWeights | None) | ResNeXt101_64X4D_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/shufflenetv2.py:216:13-223:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> ShuffleNet_V2_X0_5_QuantizedWeights | ShuffleNet_V2_X0_5_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ShuffleNet_V2_X0_5_QuantizedWeights | None) | ShuffleNet_V2_X0_5_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/shufflenetv2.py:272:13-279:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> ShuffleNet_V2_X1_0_QuantizedWeights | ShuffleNet_V2_X1_0_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ShuffleNet_V2_X1_0_QuantizedWeights | None) | ShuffleNet_V2_X1_0_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/shufflenetv2.py:328:13-335:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> ShuffleNet_V2_X1_5_QuantizedWeights | ShuffleNet_V2_X1_5_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ShuffleNet_V2_X1_5_QuantizedWeights | None) | ShuffleNet_V2_X1_5_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]
- ERROR torchvision/models/quantization/shufflenetv2.py:384:13-391:6: Keyword argument `weights` with type `tuple[Literal['pretrained'], (kwargs: dict[str, Any]) -> ShuffleNet_V2_X2_0_QuantizedWeights | ShuffleNet_V2_X2_0_Weights]` is not assignable to parameter `**weights` with type `tuple[str, ((dict[str, Any]) -> ShuffleNet_V2_X2_0_QuantizedWeights | None) | ShuffleNet_V2_X2_0_QuantizedWeights | None]` in function `torchvision.models._utils.handle_legacy_interface` [bad-argument-type]

streamlit (https://github.com/streamlit/streamlit)
- ERROR lib/streamlit/elements/widgets/select_slider.py:544:17-35: Argument `tuple[T, T] | T` is not assignable to parameter `current_value` with type `tuple[T, T] | None` in function `streamlit.elements.lib.options_selector_utils.validate_and_sync_value_with_options` [bad-argument-type]
- ERROR lib/streamlit/elements/widgets/select_slider.py:545:17-20: Argument `list[T]` is not assignable to parameter `opt` with type `Sequence[tuple[T, T]]` in function `streamlit.elements.lib.options_selector_utils.validate_and_sync_value_with_options` [bad-argument-type]
- ERROR lib/streamlit/elements/widgets/selectbox.py:660:17-35: Argument `str | T | None` is not assignable to parameter `current_value` with type `str | None` in function `streamlit.elements.lib.options_selector_utils.validate_and_sync_value_with_options` [bad-argument-type]
- ERROR lib/streamlit/elements/widgets/selectbox.py:660:37-40: Argument `list[T]` is not assignable to parameter `opt` with type `Sequence[str]` in function `streamlit.elements.lib.options_selector_utils.validate_and_sync_value_with_options` [bad-argument-type]

discord.py (https://github.com/Rapptz/discord.py)
- ERROR discord/app_commands/checks.py:390:64-71: Argument `((Interaction[Any]) -> Cooldown | None) | ((Interaction[Any]) -> Coroutine[Any, Any, Cooldown | None])` is not assignable to parameter with type `(Interaction[Any]) -> Awaitable[Cooldown] | Cooldown` in function `discord.utils.maybe_coroutine` [bad-argument-type]
- ERROR discord/automod.py:434:20-85: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]
- ERROR discord/message.py:2556:20-87: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]
- ERROR discord/onboarding.py:181:20-78: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]
- ERROR discord/onboarding.py:364:20-86: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, map[CategoryChannel | ForumChannel | StageChannel | TextChannel | Thread | VoiceChannel | None]) [no-matching-overload]

cloud-init (https://github.com/canonical/cloud-init)
- ERROR tests/unittests/test_ds_identify.py:1006:31-44: Argument `dict[LiteralString, str] | dict[str, LiteralString] | dict[str, str] | list[dict[str, int | str] | dict[str, int | str | Unknown]] | list[dict[str, int | str]] | list[str] | list[dict[str, int | str | Unknown]] | str` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `enumerate.__new__` [bad-argument-type]
+ ERROR tests/unittests/test_ds_identify.py:1012:40-48: Cannot index into `str` [bad-index]
+ ERROR tests/unittests/test_ds_identify.py:1012:40-56: Object of class `int` has no attribute `replace` [missing-attribute]
- ERROR tests/unittests/test_ds_identify.py:1484:31-44: Argument `dict[LiteralString, str] | dict[str, LiteralString] | dict[str, str] | list[dict[str, int | str] | dict[str, int | str | Unknown]] | list[dict[str, int | str]] | list[str] | list[dict[str, int | str | Unknown]] | str` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `enumerate.__new__` [bad-argument-type]
+ ERROR tests/unittests/test_ds_identify.py:1485:16-25: Cannot index into `str` [bad-index]

strawberry (https://github.com/strawberry-graphql/strawberry)
- ERROR strawberry/federation/scalar.py:37:5-11: Implementation signature `(cls: _T | None = None, *, name: str | None = None, description: str | None = None, specified_by_url: str | None = None, serialize: (...) -> Unknown = ..., parse_value: ((...) -> Unknown) | None = None, parse_literal: ((...) -> Unknown) | None = None, directives: Iterable[object] = ..., authenticated: bool = False, inaccessible: bool = False, policy: list[list[str]] | None = None, requires_scopes: list[list[str]] | None = None, tags: Iterable[str] | None = ...) -> Any` does not accept all arguments that overload signature `(cls: _T, *, name: str | None = None, description: str | None = None, specified_by_url: str | None = None, serialize: (...) -> Unknown = ..., parse_value: ((...) -> Unknown) | None = None, parse_literal: ((...) -> Unknown) | None = None, directives: Iterable[object] = ..., authenticated: bool = False, inaccessible: bool = False, policy: list[list[str]] | None = None, requires_scopes: list[list[str]] | None = None, tags: Iterable[str] | None = ...) -> _T` accepts [inconsistent-overload]
- ERROR strawberry/types/scalar.py:150:5-11: Implementation signature `(cls: _T | None = None, *, name: str | None = None, description: str | None = None, specified_by_url: str | None = None, serialize: (...) -> Unknown = ..., parse_value: ((...) -> Unknown) | None = None, parse_literal: ((...) -> Unknown) | None = None, directives: Iterable[object] = ...) -> Any` does not accept all arguments that overload signature `(cls: _T, *, name: str | None = None, description: str | None = None, specified_by_url: str | None = None, serialize: (...) -> Unknown = ..., parse_value: ((...) -> Unknown) | None = None, parse_literal: ((...) -> Unknown) | None = None, directives: Iterable[object] = ...) -> _T` accepts [inconsistent-overload]

setuptools (https://github.com/pypa/setuptools)
- ERROR setuptools/_distutils/_modified.py:91:29-47: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], ((path: FileDescriptorOrPath) -> bool) | None, Iterable[PathLike[bytes] | PathLike[str] | bytes | str]) [no-matching-overload]
- ERROR setuptools/_distutils/command/install.py:671:45-54: Argument `str | None` is not assignable to parameter `new_root` with type `PathLike[str] | str` in function `setuptools._distutils.util.change_root` [bad-argument-type]
+ ERROR setuptools/_distutils/command/install.py:671:44-76: `None` is not assignable to upper bound `bytes | str` of type variable `AnyStr` [bad-specialization]
- ERROR setuptools/_distutils/spawn.py:83:40-62: Argument `Mapping[bytes, StrOrBytesPath] | dict[str, int | str] | None` is not assignable to parameter `env` with type `Mapping[bytes, StrOrBytesPath] | Mapping[str, StrOrBytesPath] | None` in function `subprocess.check_call` [bad-argument-type]
+ ERROR setuptools/_distutils/spawn.py:83:40-62: Argument `Mapping[bytes, StrOrBytesPath] | Mapping[str, StrOrBytesPath] | dict[str, int | str] | None` is not assignable to parameter `env` with type `Mapping[bytes, StrOrBytesPath] | Mapping[str, StrOrBytesPath] | None` in function `subprocess.check_call` [bad-argument-type]
- ERROR setuptools/_distutils/spawn.py:83:58-61: Argument `Mapping[bytes, StrOrBytesPath] | Mapping[str, StrOrBytesPath] | None` is not assignable to parameter `env` with type `Mapping[bytes, StrOrBytesPath] | None` in function `_inject_macos_ver` [bad-argument-type]
- ERROR setuptools/_vendor/more_itertools/recipes.py:1100:28-36: Argument `((x: Unknown, y: Unknown) -> int) | ((p: Iterable[float], q: Iterable[float], /) -> float)` is not assignable to parameter `function` with type `(...) -> int` in function `itertools.starmap.__new__` [bad-argument-type]
- ERROR setuptools/depends.py:80:62-69: Argument `Literal['unknown'] | _T` is not assignable to parameter `default` with type `Literal['unknown'] | int` in function `get_module_constant` [bad-argument-type]

paasta (https://github.com/yelp/paasta)
- ERROR paasta_tools/check_kubernetes_services_replication.py:136:29-138:57: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.check_services_replication_tools.main` [bad-argument-type]
- ERROR paasta_tools/cli/cmds/mark_for_deployment.py:1765:50-64: Argument `type[CassandraClusterDeploymentConfig] | type[CassandraClusterEksDeploymentConfig] | type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[CassandraClusterDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/cli/utils.py:781:37-77: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/kubernetes/bin/paasta_secrets_sync.py:247:54-73: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/kubernetes/bin/paasta_secrets_sync.py:531:50-69: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/kubernetes/bin/paasta_secrets_sync.py:608:50-69: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/kubernetes/bin/paasta_secrets_sync.py:691:50-69: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/kubernetes/bin/paasta_secrets_sync.py:747:50-69: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]
- ERROR paasta_tools/setup_prometheus_adapter_config.py:973:37-56: Argument `type[EksDeploymentConfig] | type[KubernetesDeploymentConfig]` is not assignable to parameter `instance_type_class` with type `type[EksDeploymentConfig]` in function `paasta_tools.paasta_service_config_loader.PaastaServiceConfigLoader.instance_configs` [bad-argument-type]

jinja (https://github.com/pallets/jinja)
- ERROR src/jinja2/lexer.py:758:49-55: Argument `tuple[Failure] | tuple[str, ...]` is not assignable to parameter `iterable` with type `Iterable[Failure]` in function `enumerate.__new__` [bad-argument-type]

dedupe (https://github.com/dedupeio/dedupe)
- ERROR dedupe/api.py:140:9-18: Overload return type `Iterable[tuple[tuple[int, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` is not assignable to implementation return type `list[tuple[tuple[int, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` [inconsistent-overload]
+ ERROR dedupe/api.py:140:9-18: Overload return type `Iterable[tuple[tuple[int, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` is not assignable to implementation return type `list[tuple[tuple[int, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]] | tuple[tuple[str, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` [inconsistent-overload]
- ERROR dedupe/api.py:146:9-18: Overload return type `Iterable[tuple[tuple[str, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` is not assignable to implementation return type `list[tuple[tuple[int, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` [inconsistent-overload]
+ ERROR dedupe/api.py:146:9-18: Overload return type `Iterable[tuple[tuple[str, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` is not assignable to implementation return type `list[tuple[tuple[int, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]] | tuple[tuple[str, ...], ndarray[tuple[Any, ...], dtype[float64]] | tuple[float, ...]]]` [inconsistent-overload]

PyGithub (https://github.com/PyGithub/PyGithub)
- ERROR github/InputGitTreeElement.py:74:23-33: Argument `_NotSetType | str | None` is not assignable to parameter `v` with type `_NotSetType | str` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Issue.py:453:43-51: Argument `NamedUser | _NotSetType | str` is not assignable to parameter `v` with type `NamedUser | _NotSetType` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:1711:23-31: Argument `NamedUser | _NotSetType | str` is not assignable to parameter `v` with type `NamedUser | _NotSetType` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:1716:23-32: Argument `_NotSetType | list[NamedUser] | list[str]` is not assignable to parameter `v` with type `_NotSetType | list[NamedUser]` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:1723:23-29: Argument `_NotSetType | list[Label] | list[str]` is not assignable to parameter `v` with type `_NotSetType | list[Label]` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:2441:23-29: Argument `AuthenticatedUser | NamedUser | _NotSetType | str` is not assignable to parameter `v` with type `AuthenticatedUser | _NotSetType` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:3201:23-32: Argument `Milestone | _NotSetType | str` is not assignable to parameter `v` with type `Milestone | _NotSetType` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:3208:23-31: Argument `NamedUser | _NotSetType | str` is not assignable to parameter `v` with type `NamedUser | _NotSetType` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR github/Repository.py:3217:23-29: Argument `_NotSetType | list[Label] | list[str]` is not assignable to parameter `v` with type `_NotSetType | list[Label]` in function `github.GithubObject.is_defined` [bad-argument-type]
- ERROR tests/Connection.py:75:32-34: Argument `tuple[type[ReplayingHttpConnection], str] | tuple[type[ReplayingHttpsConnection], str]` is not assignable to parameter `*iterables` with type `Iterable[type[ReplayingHttpConnection] | str]` in function `itertools.chain.__new__` [bad-argument-type]
- ERROR tests/GithubObject.py:69:93-109: Argument `tuple[type[NamedUser], str] | tuple[type[Organization], str]` is not assignable to parameter `*class_and_names` with type `tuple[type[NamedUser], str]` in function `github.GithubObject.GithubObject._makeUnionClassAttributeFromTypeName` [bad-argument-type]
- ERROR tests/GithubObject.py:99:82-98: Argument `tuple[type[NamedUser], str] | tuple[type[Organization], str]` is not assignable to parameter `*class_and_names` with type `tuple[type[NamedUser], str]` in function `github.GithubObject.GithubObject._makeUnionClassAttributeFromTypeKey` [bad-argument-type]
- ERROR tests/GithubObject.py:128:101-117: Argument `tuple[type[NamedUser], str] | tuple[type[Organization], str]` is not assignable to parameter `*class_and_names` with type `tuple[type[NamedUser], str]` in function `github.GithubObject.GithubObject._makeUnionClassAttributeFromTypeKeyAndValueKey` [bad-argument-type]

bokeh (https://github.com/bokeh/bokeh)
- ERROR src/bokeh/command/subcommands/file_output.py:201:41-49: Argument `list[bytes] | list[str]` is not assignable to parameter `iterable` with type `Iterable[bytes]` in function `enumerate.__new__` [bad-argument-type]
- ERROR src/bokeh/core/property/color.py:141:42-49: Argument `IntrinsicType | UndefinedType | str | tuple[int, int, int] | tuple[int, int, int, float]` is not assignable to parameter `default` with type `IntrinsicType | UndefinedType | str` in function `bokeh.core.property.either.Either.__init__` [bad-argument-type]
- ERROR src/bokeh/core/property/enum.py:76:47-54: Argument `IntrinsicType | UndefinedType | int | str` is not assignable to parameter `default` with type `IntrinsicType | UndefinedType | int` in function `bokeh.core.property.either.Either.__init__` [bad-argument-type]
- ERROR src/bokeh/core/property/text_like.py:58:88-95: Argument `BaseText | IntrinsicType | UndefinedType | str` is not assignable to parameter `default` with type `BaseText | IntrinsicType | UndefinedType` in function `bokeh.core.property.either.Either.__init__` [bad-argument-type]
- ERROR src/bokeh/embed/standalone.py:287:27-53: No matching overload found for function `dict.__init__` called with arguments: (zip[tuple[str, RenderRoot]] | zip[tuple[str, str]]) [no-matching-overload]
+ ERROR src/bokeh/embed/standalone.py:287:27-53: No matching overload found for function `dict.__init__` called with arguments: (zip[tuple[str, RenderRoot | str]]) [no-matching-overload]
- ERROR src/bokeh/embed/standalone.py:289:24-31: Argument `list[RenderRoot] | list[str]` is not assignable to parameter `iterable` with type `Iterable[RenderRoot]` in function `tuple.__new__` [bad-argument-type]
+ ERROR src/bokeh/plotting/_plot.py:98:31-58: No matching overload found for function `bokeh.models.ranges.FactorRange.__init__` called with arguments: (factors=list[float | str]) [no-matching-overload]

aioredis (https://github.com/aio-libs/aioredis)
+ ERROR aioredis/client.py:1921:36-48: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2160:59-77: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2173:59-77: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2608:35-47: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2616:35-47: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2621:35-47: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2629:35-47: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2666:35-47: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:2674:35-47: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
+ ERROR aioredis/client.py:3176:35-53: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]
- ERROR aioredis/client.py:3190:35-59: `list[bytes | memoryview[int] | str]` is not assignable to `list[EncodableT]` [bad-assignment]
+ ERROR aioredis/client.py:3190:35-59: `list[bytes | int | memoryview[int] | str]` is not assignable to `list[EncodableT]` [bad-assignment]
+ ERROR aioredis/client.py:3190:47-59: `int` is not assignable to upper bound `bytes | memoryview[int] | str` of type variable `_KeyT` [bad-specialization]

beartype (https://github.com/beartype/beartype)
- ERROR beartype/_decor/decorcache.py:61:5-13: Implementation signature `(obj: BeartypeableT | None = None, *, conf: BeartypeConf = ...) -> ((Unknown) -> Unknown) | Unknown` does not accept all arguments that overload signature `(obj: BeartypeableT) -> BeartypeableT` accepts [inconsistent-overload]

static-frame (https://github.com/static-frame/static-frame)
- ERROR static_frame/core/db_util.py:525:17-35: Expected an iterable, got `Hashable | builtins.bool | numpy.bool[builtins.bool] | bytes | complex | date | datetime | datetime64[date | int | None] | float | inexact[Any, complex | float] | int | integer[Any] | str | timedelta64[int | timedelta | None] | tuple[TLabel, ...] | Unknown | None` [not-iterable]
+ ERROR static_frame/core/db_util.py:525:17-35: Expected an iterable, got `Hashable | builtins.bool | numpy.bool[builtins.bool] | bytes | complex | date | datetime | datetime64[date | int | None] | float | inexact[Any, complex | float] | int | integer[Any] | str | timedelta64[int | timedelta | None] | tuple[TLabel, ...] | None` [not-iterable]
- ERROR static_frame/core/index_hierarchy.py:1204:56-63: Argument `IndexHierarchy[*tuple[Any, ...]] | PendingRow | Sequence[TLabel]` is not assignable to parameter `iterable` with type `Iterable[Sequence[TLabel]]` in function `enumerate.__new__` [bad-argument-type]

porcupine (https://github.com/Akuli/porcupine)
- ERROR porcupine/plugins/git_status.py:165:26-33: Argument `str` is not assignable to parameter `element` with type `LiteralString` in function `set.add` [bad-argument-type]
- ERROR porcupine/plugins/git_status.py:170:23-53: No matching overload found for function `tkinter.ttk.Treeview.item` called with arguments: (str, tags=list[LiteralString]) [no-matching-overload]

prefect (https://github.com/PrefectHQ/prefect)
- ERROR src/prefect/_internal/concurrency/services.py:186:29-44: Argument `(self: Queue[T | None], block: bool = True, timeout: float | None = None) -> T | None` is not assignable to parameter with type `(block: bool = True, timeout: float | None = None) -> Awaitable[T] | T` in function `prefect._internal.concurrency.api.create_call` [bad-argument-type]
- ERROR src/prefect/_internal/concurrency/services.py:450:37-52: Argument `(self: Queue[T | None], block: bool = True, timeout: float | None = None) -> T | None` is not assignable to parameter with type `(block: bool = True, timeout: float | None = None) -> Awaitable[T] | T` in function `prefect._internal.concurrency.api.create_call` [bad-argument-type]
- ERROR src/prefect/_states.py:234:29-52: Argument `Collection[tuple[str, Any]]` is not assignable to parameter `states` with type `list[State[Any]]` in function `prefect.states.StateGroup.__init__` [bad-argument-type]
+ ERROR src/prefect/_states.py:234:29-52: Argument `Collection[State[Any] | tuple[str, Any]]` is not assignable to parameter `states` with type `list[State[Any]]` in function `prefect.states.StateGroup.__init__` [bad-argument-type]
- ERROR src/prefect/_states.py:234:45-51: Argument `(State[Any] & R) | Iterable[State[Any]]` is not assignable to parameter `obj` with type `Iterable[tuple[str, Any]] | tuple[str, Any]` in function `prefect.utilities.collections.ensure_iterable` [bad-argument-type]
- ERROR src/prefect/cli/_cloud_utils.py:201:36-43: Argument `list[str] | list[tuple[T, str]]` is not assignable to parameter `iterable` with type `Iterable[str]` in function `enumerate.__new__` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:704:41-53: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | classmethod[Any, P, Coroutine[Any, Any, R]] | staticmethod[P, Coroutine[Any, Any, R]]` in function `prefect.tasks.Task.__init__` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:722:18-27: Argument `Flow[P, Coroutine[Any, Any, R]] | Flow[P, R]` is not assignable to parameter `flow` with type `Flow[Ellipsis, Coroutine[Any, Any, R]]` in function `prefect.client.orchestration._flow_runs.client.FlowRunClient.create_flow_run` [bad-argument-type]
+ ERROR src/prefect/flow_engine.py:722:18-27: Argument `Flow[P, Coroutine[Any, Any, R]] | Flow[P, R]` is not assignable to parameter `flow` with type `Flow[Ellipsis, Coroutine[Any, Any, R] | R]` in function `prefect.client.orchestration._flow_runs.client.FlowRunClient.create_flow_run` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:1004:53-65: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `(...) -> Coroutine[Any, Any, R]` in function `prefect.utilities.callables.call_with_parameters` [bad-argument-type]
+ ERROR src/prefect/flow_engine.py:1004:26-83: Type `R` is not awaitable [not-async]
- ERROR src/prefect/flow_engine.py:1009:43-55: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `(...) -> Coroutine[Any, Any, R]` in function `prefect.utilities.callables.call_with_parameters` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:1010:33-39: Argument `Coroutine[Any, Any, R]` is not assignable to parameter `result` with type `R` in function `FlowRunEngine.handle_success` [bad-argument-type]
+ ERROR src/prefect/flow_engine.py:1010:33-39: Argument `Coroutine[Any, Any, R] | R` is not assignable to parameter `result` with type `R` in function `FlowRunEngine.handle_success` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:1307:41-53: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | classmethod[Any, P, Coroutine[Any, Any, R]] | staticmethod[P, Coroutine[Any, Any, R]]` in function `prefect.tasks.Task.__init__` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:1323:18-27: Argument `Flow[P, Coroutine[Any, Any, R]] | Flow[P, R]` is not assignable to parameter `flow` with type `Flow[Ellipsis, Coroutine[Any, Any, R]]` in function `prefect.client.orchestration._flow_runs.client.FlowRunAsyncClient.create_flow_run` [bad-argument-type]
+ ERROR src/prefect/flow_engine.py:1323:18-27: Argument `Flow[P, Coroutine[Any, Any, R]] | Flow[P, R]` is not assignable to parameter `flow` with type `Flow[Ellipsis, Coroutine[Any, Any, R] | R]` in function `prefect.client.orchestration._flow_runs.client.FlowRunAsyncClient.create_flow_run` [bad-argument-type]
- ERROR src/prefect/flow_engine.py:1610:45-57: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `(...) -> Coroutine[Any, Any, R]` in function `prefect.utilities.callables.call_with_parameters` [bad-argument-type]
+ ERROR src/prefect/flow_engine.py:1610:18-75: Type `R` is not awaitable [not-async]
- ERROR src/prefect/flow_engine.py:1612:16-22: Returned type `R` is not assignable to declared return type `Coroutine[Any, Any, R]` [bad-return]
+ ERROR src/prefect/flow_engine.py:1612:16-22: Returned type `R | Unknown` is not assignable to declared return type `Coroutine[Any, Any, R]` [bad-return]
+ ERROR src/prefect/input/run_input.py:886:9-49: `type[R | T] | type[AutomaticRunInput[@_]]` is not assignable to `type[AutomaticRunInput[T]] | type[R]` [bad-assignment]
+ ERROR src/prefect/input/run_input.py:886:37-49: `T` is not assignable to upper bound `RunInput` of type variable `R` [bad-specialization]
- ERROR src/prefect/states.py:369:29-52: Argument `Collection[tuple[str, Any]]` is not assignable to parameter `states` with type `list[State[Any]]` in function `StateGroup.__init__` [bad-argument-type]
+ ERROR src/prefect/states.py:369:29-52: Argument `Collection[State[Any] | tuple[str, Any]]` is not assignable to parameter `states` with type `list[State[Any]]` in function `StateGroup.__init__` [bad-argument-type]
- ERROR src/prefect/states.py:369:45-51: Argument `(State[Any] & R) | Iterable[State[Any]]` is not assignable to parameter `obj` with type `Iterable[tuple[str, Any]] | tuple[str, Any]` in function `prefect.utilities.collections.ensure_iterable` [bad-argument-type]
- ERROR src/prefect/task_engine.py:1031:43-55: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `(...) -> Coroutine[Any, Any, R]` in function `prefect.utilities.callables.call_with_parameters` [bad-argument-type]
- ERROR src/prefect/task_engine.py:1032:29-35: Argument `Coroutine[Any, Any, R] | ResultRecord[Any] | None` is not assignable to parameter `result` with type `R` in function `SyncTaskRunEngine.handle_success` [bad-argument-type]
+ ERROR src/prefect/task_engine.py:1032:29-35: Argument `Coroutine[Any, Any, R] | ResultRecord[Any] | R | None` is not assignable to parameter `result` with type `R` in function `SyncTaskRunEngine.handle_success` [bad-argument-type]
- ERROR src/prefect/task_engine.py:1406:76-85: Argument `Task[P, Coroutine[Any, Any, R]] | Task[P, R]` is not assignable to parameter `task` with type `Task[P, Coroutine[Any, Any, R]]` in function `prefect.results.ResultStore.aupdate_for_task` [bad-argument-type]
+ ERROR src/prefect/task_engine.py:1406:76-85: Argument `Task[P, Coroutine[Any, Any, R]] | Task[P, R]` is not assignable to parameter `task` with type `Task[P, Coroutine[Any, Any, R] | R]` in function `prefect.results.ResultStore.aupdate_for_task` [bad-argument-type]
- ERROR src/prefect/task_engine.py:1642:49-61: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> R)` is not assignable to parameter `fn` with type `(...) -> Coroutine[Any, Any, R]` in function `prefect.utilities.callables.call_with_parameters` [bad-argument-type]
+ ERROR src/prefect/task_engine.py:1642:22-74: Type `R` is not awaitable [not-async]
- ERROR src/prefect/task_engine.py:1643:35-41: Argument `ResultRecord[Any] | R | None` is not assignable to parameter `result` with type `R` in function `AsyncTaskRunEngine.handle_success` [bad-argument-type]
+ ERROR src/prefect/task_engine.py:1643:35-41: Argument `ResultRecord[Any] | R | Unknown | None` is not assignable to parameter `result` with type `R` in function `AsyncTaskRunEngine.handle_success` [bad-argument-type]
- ERROR src/prefect/variables.py:199:9-12: Overload return type `bool | dict[str, Any] | float | int | list[Any] | str | None` is not assignable to implementation return type `Coroutine[Any, Any, bool | None] | bool | None` [inconsistent-overload]
- ERROR src/prefect/variables.py:206:9-12: Overload return type `bool | dict[str, Any] | float | int | list[Any] | str | None` is not assignable to implementation return type `Coroutine[Any, Any, bool | None] | bool | None` [inconsistent-overload]
- ERROR src/integrations/prefect-aws/prefect_aws/observers/ecs.py:357:60-67: Argument `AsyncEcsEventHandler | EcsEventHandler` is not assignable to parameter `func` with type `(...) -> Coroutine[Unknown, Unknown, None]` in function `functools.partial.__new__` [bad-argument-type]

async-utils (https://github.com/mikeshardmind/async-utils)
- ERROR src/async_utils/task_cache.py:189:16-20: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> Task[R])` is not assignable to parameter `wrapped` with type `(ParamSpec(P)) -> Coroutine[Any, Any, R]` in function `functools.wraps` [bad-argument-type]
- ERROR src/async_utils/task_cache.py:277:16-20: Argument `((ParamSpec(P)) -> Coroutine[Any, Any, R]) | ((ParamSpec(P)) -> Task[R])` is not assignable to parameter `wrapped` with type `(ParamSpec(P)) -> Coroutine[Any, Any, R]` in function `functools.wraps` [bad-argument-type]

sockeye (https://github.com/awslabs/sockeye)
- ERROR sockeye/checkpoint_decoder.py:91:53-72: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
- ERROR sockeye/checkpoint_decoder.py:92:57-76: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
- ERROR sockeye/checkpoint_decoder.py:116:27-33: Argument `list[bytes]` is not assignable to parameter `data` with type `list[str]` in function `write_to_file` [bad-argument-type]
+ ERROR sockeye/checkpoint_decoder.py:116:27-33: Argument `list[bytes] | list[Any]` is not assignable to parameter `data` with type `list[str]` in function `write_to_file` [bad-argument-type]
- ERROR sockeye/checkpoint_decoder.py:118:27-33: Argument `list[bytes]` is not assignable to parameter `data` with type `list[str]` in function `write_to_file` [bad-argument-type]
+ ERROR sockeye/checkpoint_decoder.py:118:27-33: Argument `list[bytes] | list[Any]` is not assignable to parameter `data` with type `list[str]` in function `write_to_file` [bad-argument-type]
- ERROR sockeye/checkpoint_decoder.py:160:49-102: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
- ERROR sockeye/checkpoint_decoder.py:176:30-63: No matching overload found for function `print` called with arguments: (str, file=BinaryIO) [no-matching-overload]
+ ERROR sockeye/checkpoint_decoder.py:176:30-63: No matching overload found for function `print` called with arguments: (str, file=BinaryIO | GzipFile | IO[Any]) [no-matching-overload]
- ERROR sockeye/data_io.py:378:53-77: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
- ERROR sockeye/data_io.py:380:53-77: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
- ERROR sockeye/data_io.py:383:52-76: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
- ERROR sockeye/data_io.py:384:52-76: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]
+ ERROR sockeye/data_io.py:391:28-32: Argument `Any | None` is not assignable to parameter `data` with type `Buffer` in function `gzip.GzipFile.write` [bad-argument-type]
+ ERROR sockeye/data_io.py:394:28-32: Argument `Any | None` is not assignable to parameter `data` with type `Buffer` in function `gzip.GzipFile.write` [bad-argument-type]
- ERROR sockeye/data_io.py:1196:34-40: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `iterable` with type `Iterable[bytes]` in function `enumerate.__new__` [bad-argument-type]
- ERROR sockeye/data_io.py:1199:35-39: Argument `bytes` is not assignable to parameter `line` with type `str` in function `sockeye.utils.get_tokens` [bad-argument-type]
+ ERROR sockeye/data_io.py:1199:35-39: Argument `bytes | str` is not assignable to parameter `line` with type `str` in function `sockeye.utils.get_tokens` [bad-argument-type]
- ERROR sockeye/rerank.py:131:63-89: Argument `zip[tuple[bytes, bytes]] | zip[tuple[bytes, str]] | zip[tuple[bytes, Any]] | zip[tuple[str, bytes]] | zip[tuple[str, str]] | zip[tuple[str, Any]] | zip[tuple[Any, bytes]] | zip[tuple[Any, str]] | zip[tuple[Any, Any]]` is not assignable to parameter `iterable` with type `Iterable[tuple[bytes, bytes]]` in function `enumerate.__new__` [bad-argument-type]
- ERROR sockeye/rerank.py:144:67-76: Argument `bytes` is not assignable to parameter `reference` with type `str` in function `Reranker.rerank` [bad-argument-type]
+ ERROR sockeye/rerank.py:144:67-76: Argument `bytes | str` is not assignable to parameter `reference` with type `str` in function `Reranker.rerank` [bad-argument-type]
- ERROR sockeye/rerank.py:165:22-59: No matching overload found for function `print` called with arguments: (Literal[''] | bytes | Unknown, file=BinaryIO | GzipFile | IO[Any] | TextIO | TextIOWrapper[_WrappedBuffer] | Any) [no-matching-overload]
+ ERROR sockeye/rerank.py:165:22-59: No matching overload found for function `print` called with arguments: (bytes | str | Unknown, file=BinaryIO | GzipFile | IO[Any] | TextIO | TextIOWrapper[_WrappedBuffer] | Any) [no-matching-overload]
- ERROR sockeye/translate.py:189:49-62: Argument `BinaryIO | GzipFile | IO[Any] | TextIOWrapper[_WrappedBuffer]` is not assignable to parameter `cm` with type `AbstractContextManager[BinaryIO, bool | None]` in function `contextlib._BaseExitStack.enter_context` [bad-argument-type]

cryptography (https://github.com/pyca/cryptography)
- ERROR tests/x509/test_x509_revokedcertbuilder.py:202:17-31: Argument `type[CRLReason] | type[CertificateIssuer] | type[InvalidityDate]` is not assignable to parameter `extclass` with type `type[CRLReason]` in function `cryptography.x509.extensions.Extensions.get_extension_for_class` [bad-argument-type]

jax (https://github.com/google/jax)
- ERROR jax/_src/array.py:1158:33-42: Argument `tuple[Never] | tuple[slice[Any, Any, Any], ...]` is not assignable to parameter `iterable` with type `Iterable[Never]` in function `enumerate.__new__` [bad-argument-type]
+ ERROR jax/_src/array.py:1170:7-25: Cannot set item in `list[Never]` [unsupported-operation]
- ERROR jax/_src/internal_test_util/test_harnesses.py:2381:14-65: `-` is not supported between `set[type[complex128]]` and `set[type[complex128] | type[complex64]]` [unsupported-operation]
- ERROR jax/_src/internal_test_util/test_harnesses.py:2405:14-2406:62: `-` is not supported between `set[type[bool]]` and `set[type[bool] | type[complex128] | type[complex64] | type[int8] | type[uint8]]` [unsupported-operation]
+ ERROR jax/_src/pallas/mosaic_gpu/lowering.py:809:14-29: Argument `tuple[DynamicGridDim | int, ...]` is not assignable to parameter `grid` with type `tuple[GridElement, ...]` in function `jax._src.pallas.mosaic_gpu.pipeline.emit_pipeline` [bad-argument-type]
- ERROR jax/_src/pallas/mosaic_gpu/lowering.py:763:34-38: Argument `Sequence[int] | tuple[DynamicGridDim | int, ...]` is not assignable to parameter `iterable` with type `Iterable[int]` in function `enumerate.__new__` [bad-argument-type]
- ERROR jax/_src/pallas/mosaic_gpu/lowering.py:766:34-38: Argument `Sequence[int] | tuple[DynamicGridDim | int, ...]` is not assignable to parameter `iterable` with type `Iterable[int]` in function `enumerate.__new__` [bad-argument-type]
+ ERROR jax/_src/pallas/mosaic_gpu/lowering.py:842:9-22: Argument `tuple[DynamicGridDim | int, ...]` is not assignable to parameter `grid` with type `tuple[int, ...]` in function `lower_jaxpr_to_module` [bad-argument-type]
- ERROR jax/experimental/jax2tf/call_tf.py:191:15-194:53: Argument `list[tuple[Any, ShapedArray]] | list[tuple[Any, None]] | zip[tuple[Any, ShapedArray]] | zip[tuple[Any, None]]` is not assignable to parameter `iterable` with type `Iterable[tuple[Any, ShapedArray]]` in function `enumerate.__new__` [bad-argument-type]

CPython (cases_generator) (https://github.com/python/cpython)
- ERROR Tools/cases_generator/parsing.py:333:5-16: Argument `(self: Self@Parser) -> Family | InstDef | LabelDef | Macro | Pseudo | None` is not assignable to parameter `func` with type `(Self@Parser) -> Family | None` in function `contextual` [bad-argument-type]
- ERROR Tools/cases_generator/parsing.py:429:5-16: Argument `(self: Self@Parser) -> CacheEffect | StackEffect | None` is not assignable to parameter `func` with type `(Self@Parser) -> CacheEffect | None` in function `contextual` [bad-argument-type]
- ERROR Tools/cases_generator/parsing.py:535:5-16: Argument `(self: Self@Parser) -> CacheEffect | OpName | None` is not assignable to parameter `func` with type `(Self@Parser) -> CacheEffect | None` in function `contextual` [bad-argument-type]
+  WARN Tools/cases_generator/parsing.py:419:23-41: Redundant cast: `CacheEffect | StackEffect` is the same type as `CacheEffect | StackEffect` [redundant-cast]
+  WARN Tools/cases_generator/parsing.py:524:23-33: Redundant cast: `CacheEffect | OpName` is the same type as `CacheEffect | OpName` [redundant-cast]
+  WARN Tools/cases_generator/parsing.py:528:31-41: Redundant cast: `CacheEffect | OpName` is the same type as `CacheEffect | OpName` [redundant-cast]

kopf (https://github.com/nolar/kopf)
- ERROR kopf/_kits/hierarchies.py:40:53-57: Argument `Iterable[KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown] | KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown` is not assignable to parameter `objs` with type `Iterable[Iterable[KubernetesModel] | KubernetesModel] | Iterable[KubernetesModel] | KubernetesModel` in function `kopf._cogs.structs.dicts.walk` [bad-argument-type]
- ERROR kopf/_kits/hierarchies.py:78:53-57: Argument `Iterable[KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown] | KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown` is not assignable to parameter `objs` with type `Iterable[Iterable[KubernetesModel] | KubernetesModel] | Iterable[KubernetesModel] | KubernetesModel` in function `kopf._cogs.structs.dicts.walk` [bad-argument-type]
- ERROR kopf/_kits/hierarchies.py:121:53-57: Argument `Iterable[KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown] | KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown` is not assignable to parameter `objs` with type `Iterable[Iterable[KubernetesModel] | KubernetesModel] | Iterable[KubernetesModel] | KubernetesModel` in function `kopf._cogs.structs.dicts.walk` [bad-argument-type]
- ERROR kopf/_kits/hierarchies.py:174:53-57: Argument `Iterable[KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown] | KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown` is not assignable to parameter `objs` with type `Iterable[Iterable[KubernetesModel] | KubernetesModel] | Iterable[KubernetesModel] | KubernetesModel` in function `kopf._cogs.structs.dicts.walk` [bad-argument-type]
- ERROR kopf/_kits/hierarchies.py:228:53-57: Argument `Iterable[KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown] | KubernetesModel | MutableMapping[Any, Any] | _dummy | Unknown` is not assignable to parameter `objs` with type `Iterable[Iterable[KubernetesModel] | KubernetesModel] | Iterable[KubernetesModel] | KubernetesModel` in function `kopf._cogs.structs.dicts.walk` [bad-argument-type]

sphinx (https://github.com/sphinx-doc/sphinx)
- ERROR sphinx/util/template.py:49:38-57: No matching overload found for function `filter.__new__` called with arguments: (type[filter[_T]], None, Sequence[PathLike[str] | str]) [no-matching-overload]

scrapy (https://github.com/scrapy/scrapy)
- ERROR tests/test_http_request.py:619:23-31: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:620:23-28: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:621:19-26: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:622:19-24: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:642:23-31: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:643:23-28: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:644:19-26: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:645:19-24: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:664:23-31: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:665:23-28: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:666:19-26: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:667:19-24: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:893:19-36: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:909:19-36: Cannot index into `dict[bytes, list[bytes]]` [bad-index]
- ERROR tests/test_http_request.py:1511:21-24: Argument `bytes | str` is not assignable to parameter `qs` with type `bytes | None` in function `urllib.parse.parse_qs` [bad-argument-type]

pwndbg (https://github.com/pwndbg/pwndbg)
- ERROR pwndbg/commands/cpsr.py:23:1-61: Argument `(((cpsr_value: Unknown | None = None) -> None) -> (cpsr_value: Unknown | None = None) -> None) | ((cpsr_value: Unknown | None = None) -> None)` is not assignable to parameter with type `((cpsr_value: Unknown | None = None) -> None) -> (cpsr_value: Unknown | None = None) -> None` [bad-argument-type]

@asukaminato0721 asukaminato0721 marked this pull request as ready for review February 22, 2026 10:07
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.

fix handling of bool and abs values

2 participants