Skip to content

Preserve original type for unannotated passthrough decorators (#2825)#2825

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

Preserve original type for unannotated passthrough decorators (#2825)#2825
grievejia wants to merge 1 commit intofacebook:mainfrom
grievejia:export-D96672235

Conversation

@grievejia
Copy link
Contributor

@grievejia grievejia commented Mar 18, 2026

Summary:

Pyrefly was emitting a false positive bad-argument-count error when a function was decorated with a "dual-use" decorator — one that can be used as both decs and decs(flag). This pattern is common in libraries like click, celery, and flask, as well as in application code.

The root cause is that Pyrefly infers the return type of such decorators as a union of all return paths. For example, a decorator like optional_debug that returns either decorator(func_or_flag) (a passthrough wrapper) or decorator (the factory function) gets a union type of wrapper | decorator. When the decorated function is called, the decorator branch of the union rejects the arguments (wrong arity), producing a spurious error even though the wrapper branch accepts them.

The fix adapts pyright's unannotated decorator passthrough heuristic: when a decorator call returns a callable (or a union containing one) that has only *args/**kwargs parameters with all implicit Any types and an implicit Any return — the hallmark of an unannotated passthrough wrapper — we preserve the original decorated function's type instead. This is sound because such a wrapper provides no type information; preserving the original signature is strictly more informative.

Changes:

  • Add Callable::is_unannotated_passthrough() to detect the (*args, **kwargs) -> Unknown pattern
  • Add Type::is_unannotated_passthrough() as a convenience wrapper for Function/Callable variants
  • Add two match arms in apply_function_decorator to handle direct passthrough and union-containing-passthrough cases
  • Add test cases for dual-use decorators and simple unannotated passthrough decorators

Fixes #2621

Differential Revision: D96672235

@meta-cla meta-cla bot added the cla signed label Mar 18, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 18, 2026

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

@github-actions

This comment has been minimized.

…ok#2825)

Summary:

Pyrefly was emitting a false positive `bad-argument-count` error when a function was decorated with a "dual-use" decorator — one that can be used as both `decs` and `decs(flag)`. This pattern is common in libraries like click, celery, and flask, as well as in application code.

The root cause is that Pyrefly infers the return type of such decorators as a union of all return paths. For example, a decorator like `optional_debug` that returns either `decorator(func_or_flag)` (a passthrough wrapper) or `decorator` (the factory function) gets a union type of `wrapper | decorator`. When the decorated function is called, the `decorator` branch of the union rejects the arguments (wrong arity), producing a spurious error even though the `wrapper` branch accepts them.

The fix adapts pyright's unannotated decorator passthrough heuristic: when a decorator call returns a callable (or a union containing one) that has only `*args`/`**kwargs` parameters with all implicit `Any` types and an implicit `Any` return — the hallmark of an unannotated passthrough wrapper — we preserve the original decorated function's type instead. This is sound because such a wrapper provides no type information; preserving the original signature is strictly more informative.

Changes:
- Add `Callable::is_unannotated_passthrough()` to detect the `(*args, **kwargs) -> Unknown` pattern
- Add `Type::is_unannotated_passthrough()` as a convenience wrapper for Function/Callable variants
- Add two match arms in `apply_function_decorator` to handle direct passthrough and union-containing-passthrough cases
- Add test cases for dual-use decorators and simple unannotated passthrough decorators

Fixes facebook#2621

Differential Revision: D96672235
@meta-codesync meta-codesync bot changed the title Preserve original type for unannotated passthrough decorators Preserve original type for unannotated passthrough decorators (#2825) Mar 18, 2026
@github-actions

This comment has been minimized.

@github-actions
Copy link

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

ibis (https://github.com/ibis-project/ibis)
+ ERROR ibis/backends/materialize/tests/test_mz_now.py:91:16-48: `-` is not supported between `TimestampScalar` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/backends/materialize/tests/test_streaming_edge_cases.py:156:16-48: `-` is not supported between `TimestampScalar` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/common/tests/test_annotations.py:371:20-23: Argument `float` is not assignable to parameter `b` with type `int` in function `test` [bad-argument-type]
+ ERROR ibis/common/tests/test_annotations.py:391:23-26: Argument `float` is not assignable to parameter `c` with type `int` in function `test` [bad-argument-type]
+ ERROR ibis/common/tests/test_annotations.py:423:22-30: Argument `Literal['qweqwe']` is not assignable to parameter `b` with type `float | int` in function `test` [bad-argument-type]
- ERROR ibis/common/tests/test_annotations.py:432:12-30: Object of class `FunctionType` has no attribute `__signature__`
+ ERROR ibis/common/tests/test_annotations.py:432:12-30: Object of class `FunctionType` has no attribute `__signature__` [missing-attribute]
- Object of class `partial` has no attribute `__signature__` [missing-attribute]
+ ERROR ibis/common/tests/test_annotations.py:456:33-36: Argument `float` is not assignable to parameter `*args` with type `int` in function `test` [bad-argument-type]
+ ERROR ibis/common/tests/test_annotations.py:468:41-44: Keyword argument `f` with type `float` is not assignable to parameter `**kwargs` with type `int` in function `test` [bad-argument-type]
+ ERROR ibis/common/tests/test_annotations.py:476:24-27: Argument `float` is not assignable to parameter `*args` with type `int` in function `test` [bad-argument-type]
+ ERROR ibis/common/tests/test_annotations.py:476:34-37: Keyword argument `c` with type `float` is not assignable to parameter `**kwargs` with type `int` in function `test` [bad-argument-type]
+ ERROR ibis/expr/builders.py:215:23-28: Argument `Cast | Unknown` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/expr/builders.py:215:23-28: Argument `Cast | Unknown` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/expr/builders.py:215:30-33: Argument `Cast | Unknown` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/expr/builders.py:215:30-33: Argument `Cast | Unknown` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `WindowBuilder.rows` [bad-argument-type]
- ERROR ibis/expr/builders.py:296:20-42: Returned type `((*args: Unknown, **kwargs: Unknown) -> Unknown) | partial[((*args: Unknown, **kwargs: Unknown) -> Unknown) | partial[((*args: Unknown, **kwargs: Unknown) -> Unknown) | Unknown]] | Unknown` is not assignable to declared return type `Self@LegacyWindowBuilder` [bad-return]
- ERROR ibis/expr/builders.py:298:20-39: Returned type `((*args: Unknown, **kwargs: Unknown) -> Unknown) | partial[((*args: Unknown, **kwargs: Unknown) -> Unknown) | partial[((*args: Unknown, **kwargs: Unknown) -> Unknown) | Unknown]] | Unknown` is not assignable to declared return type `Self@LegacyWindowBuilder` [bad-return]
- ERROR ibis/expr/builders.py:300:20-40: Returned type `((*args: Unknown, **kwargs: Unknown) -> Unknown) | partial[((*args: Unknown, **kwargs: Unknown) -> Unknown) | partial[((*args: Unknown, **kwargs: Unknown) -> Unknown) | Unknown]] | Unknown` is not assignable to declared return type `Self@LegacyWindowBuilder` [bad-return]
- ERROR ibis/expr/types/generic.py:914:50-61: Object of class `FunctionType` has no attribute `bind`
- Object of class `partial` has no attribute `bind` [missing-attribute]
+ ERROR ibis/tests/expr/test_temporal.py:513:18-27: `-` is not supported between `TimestampValue` and `TimestampValue` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:513:29-38: `-` is not supported between `TimestampValue` and `TimestampValue` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:518:18-26: `-` is not supported between `TimestampValue` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:518:28-36: `-` is not supported between `TimestampValue` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:532:18-25: `-` is not supported between `DateValue` and `DateValue` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:532:27-34: `-` is not supported between `DateValue` and `DateValue` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:537:18-25: `-` is not supported between `DateValue` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:537:27-34: `-` is not supported between `DateValue` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:551:18-25: `-` is not supported between `TimeValue` and `TimeValue` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:551:27-34: `-` is not supported between `TimeValue` and `TimeValue` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:556:18-25: `-` is not supported between `TimeValue` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:556:27-34: `-` is not supported between `TimeValue` and `IntervalScalar` [unsupported-operation]
+ ERROR ibis/tests/expr/test_temporal.py:573:13-19: `-` is not supported between `DateValue` and `IntervalScalar` [unsupported-operation]
- ERROR ibis/tests/expr/test_window_frames.py:67:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:63:16-19: Missing argument `end` in function `ibis.expr.builders.WindowBuilder.rows` [missing-argument]
+ ERROR ibis/tests/expr/test_window_frames.py:63:17-18: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:65:18-19: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:65:21-23: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:68:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:71:18-20: Argument `Literal[-5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:71:22-24: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:69:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:72:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:73:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:74:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:80:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:77:17-19: Argument `Literal[-5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:77:21-24: Argument `Literal[-10]` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:79:18-20: Argument `Literal[-5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:79:22-24: Argument `Literal[-4]` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:81:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:84:18-19: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:82:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:85:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:89:24-26: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:86:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:87:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:90:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:91:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:100:17-18: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:100:20-41: Argument `IntervalScalar` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:102:17-38: Argument `IntervalScalar` is not assignable to parameter `start` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:102:40-42: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Integer] | None` in function `ibis.expr.builders.WindowBuilder.rows` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:111:17-20: Missing argument `end` in function `ibis.expr.builders.WindowBuilder.range` [missing-argument]
+ ERROR ibis/tests/expr/test_window_frames.py:111:18-19: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:113:19-20: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:113:22-24: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:92:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:95:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:96:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:97:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:115:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:116:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:119:19-21: Argument `Literal[-5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:119:23-25: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:117:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:120:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:121:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:122:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:128:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:125:18-20: Argument `Literal[-5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:125:22-25: Argument `Literal[-10]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:127:19-21: Argument `Literal[-5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:127:23-25: Argument `Literal[-3]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:129:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:132:19-20: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:130:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:133:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:137:25-27: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:134:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:135:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:138:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:139:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:147:19-40: Argument `IntervalScalar` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:147:42-63: Argument `IntervalScalar` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:140:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:143:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:144:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:145:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:148:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:149:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:152:19-41: Argument `IntervalValue` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:152:43-64: Argument `IntervalScalar` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:150:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:153:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:154:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:157:19-41: Argument `IntervalValue` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:157:43-45: Argument `Literal[10]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:155:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:158:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:163:20-21: Argument `Literal[5]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:163:23-48: Argument `IntervalScalar` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.range` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:160:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:161:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:165:12-21: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:166:12-19: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:173:27-28: Argument `Literal[5]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.between` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:167:12-19: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:174:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:175:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:178:21-22: Argument `Literal[1]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.between` [bad-argument-type]
+ ERROR ibis/tests/expr/test_window_frames.py:178:24-25: Argument `Literal[3]` is not assignable to parameter `end` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.between` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:176:12-18: Object of class `FunctionType` has no attribute `how`
- Object of class `partial` has no attribute `how` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:179:12-20: Object of class `FunctionType` has no attribute `start`
- Object of class `partial` has no attribute `start` [missing-attribute]
- ERROR ibis/tests/expr/test_window_frames.py:180:12-18: Object of class `FunctionType` has no attribute `end`
- Object of class `partial` has no attribute `end` [missing-attribute]
+ ERROR ibis/tests/expr/test_window_frames.py:183:21-23: Argument `Literal[-1]` is not assignable to parameter `start` with type `WindowBoundary[Interval | Numeric] | None` in function `ibis.expr.builders.WindowBuilder.between` [bad-argument-type]
- ERROR ibis/tests/expr/test_window_frames.py:181:12-18: Object of class `FunctionType` has no attribute `how`

... (truncated 69 lines) ...

cki-lib (https://gitlab.com/cki-project/cki-lib)
- ERROR tests/test_retrying.py:62:26-52: Object of class `FunctionType` has no attribute `failed_count` [missing-attribute]
+ ERROR tests/test_retrying.py:62:26-52: Object of class `_lru_cache_wrapper` has no attribute `failed_count` [missing-attribute]
- ERROR tests/test_retrying.py:70:9-34: Object of class `FunctionType` has no attribute `__wrapped__` [missing-attribute]
+ ERROR tests/test_retrying.py:70:9-46: Object of class `FunctionType` has no attribute `cache_clear` [missing-attribute]

scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ ERROR sklearn/calibration.py:480:31-50: Object of class `list` has no attribute `reshape` [missing-attribute]
+ ERROR sklearn/calibration.py:486:55-72: Object of class `list` has no attribute `dtype` [missing-attribute]
+ ERROR sklearn/calibration.py:735:39-54: Cannot index into `SparseABC` [bad-index]
+ ERROR sklearn/cluster/_affinity_propagation.py:517:37-74: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/_agglomerative.py:672:13-37: Cannot set item in `None` [unsupported-operation]
+ ERROR sklearn/cluster/_birch.py:88:18-28: Object of class `NoneType` has no attribute `shape` [missing-attribute]
+ ERROR sklearn/cluster/_birch.py:90:37-48: Object of class `NoneType` has no attribute `argmax` [missing-attribute]
+ ERROR sklearn/cluster/_birch.py:91:30-51: `None` is not subscriptable [unsupported-operation]
+ ERROR sklearn/cluster/_kmeans.py:527:29-61: `/` is not supported between `None` and `Literal[2]` [unsupported-operation]
+ ERROR sklearn/cluster/_kmeans.py:574:33-69: `/` is not supported between `None` and `Literal[2]` [unsupported-operation]
+ ERROR sklearn/cluster/_spectral.py:760:13-31: Cannot unpack tuple[Unknown, Unknown, Unknown] | tuple[Unknown, Unknown, Unknown, Unknown] (of size 4) into 3 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:21:1-5: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:37:9-79: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:37:30-38: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:39:5-36: Cannot unpack tuple[Unknown, Unknown] | tuple[Unknown, Unknown, Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:52:9-46: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:73:9-46: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:93:5-22: Cannot unpack tuple[Unknown, Unknown] | tuple[Unknown, Unknown, Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:101:9-46: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:117:10-18: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:131:19-22: Object of class `list` has no attribute `T` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:155:9-46: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:159:9-39: Cannot unpack tuple[Unknown, Unknown] | tuple[Unknown, Unknown, Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:167:9-39: Cannot unpack tuple[Unknown, Unknown] | tuple[Unknown, Unknown, Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:176:9-39: Cannot unpack tuple[Unknown, Unknown] | tuple[Unknown, Unknown, Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:220:9-46: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:228:9-46: Unary `-` is not supported on `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_affinity_propagation.py:243:5-19: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:19:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:20:9-17: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:33:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:34:9-17: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:75:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:76:9-17: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:99:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:100:9-17: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:118:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:124:25-34: Cannot index into `list[Unknown]` [bad-index]
+ ERROR sklearn/cluster/tests/test_birch.py:137:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:138:9-17: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:162:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:163:9-17: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:176:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:183:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:193:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_birch.py:196:30-38: Object of class `list` has no attribute `astype` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_birch.py:202:9-73: Object of class `list` has no attribute `astype` [missing-attribute]
- ERROR sklearn/cluster/tests/test_hierarchical.py:88:9-49: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_feature_agglomeration.py:47:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:27:1-5: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:28:1-5: Type `None` is not iterable [not-iterable]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:75:43-67: Cannot index into `list[Unknown]` [bad-index]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:85:18-24: Object of class `NoneType` has no attribute `copy` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:97:5-12: Cannot set item in `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:98:5-12: Cannot set item in `None` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:152:37-44: Object of class `list` has no attribute `shape` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:153:37-44: Object of class `list` has no attribute `shape` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:155:45-52: Object of class `list` has no attribute `shape` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:210:43-63: Cannot index into `list[Unknown]` [bad-index]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:220:58-65: Object of class `list` has no attribute `shape` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:287:9-22: Cannot set item in `list[Unknown]` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:309:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:320:26-33: Object of class `list` has no attribute `shape` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:369:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:469:5-16: Cannot set item in `list[Unknown]` [unsupported-operation]
+ ERROR sklearn/cluster/tests/test_hdbscan.py:483:5-9: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray[tuple[Unknown, Unknown], dtype[Unknown]] | Unknown, list[Unknown] | ndarray[tuple[Unknown]] | Unknown, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] (of size 3) into 2 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:88:9-49: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:111:17-52: Cannot unpack tuple[ndarray[tuple[Any, ...], dtype[Unknown]], Literal[1], int | Any, None] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], Literal[1], int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray] (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:119:21-56: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:133:9-44: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:119:21-56: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:133:9-44: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:224:40-60: Object of class `SparseABC` has no attribute `toarray`
+ Object of class `ndarray` has no attribute `toarray` [missing-attribute]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:234:22-42: Object of class `SparseABC` has no attribute `toarray`
+ Object of class `ndarray` has no attribute `toarray` [missing-attribute]
- ERROR sklearn/cluster/tests/test_hierarchical.py:353:13-37: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:353:13-37: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:386:5-29: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:386:5-29: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:519:35-52: Argument `ndarray[tuple[Unknown], dtype[Unknown]] | ndarray | ndarray[tuple[Any, ...], dtype[Unknown]] | None` is not assignable to parameter `actual` with type `_NestedSequence[_SupportsArray[dtype[numpy.bool | number]]] | _NestedSequence[_SupportsArray[dtype[object_]]] | _NestedSequence[complex] | _SupportsArray[dtype[numpy.bool | number]] | _SupportsArray[dtype[object_]] | complex` in function `numpy.testing._private.utils.assert_array_almost_equal` [bad-argument-type]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:519:54-69: Argument `ndarray[tuple[Unknown], dtype[Unknown]] | ndarray | ndarray[tuple[Any, ...], dtype[Unknown]] | None` is not assignable to parameter `desired` with type `_NestedSequence[_SupportsArray[dtype[numpy.bool | number]]] | _NestedSequence[_SupportsArray[dtype[object_]]] | _NestedSequence[complex] | _SupportsArray[dtype[numpy.bool | number]] | _SupportsArray[dtype[object_]] | complex` in function `numpy.testing._private.utils.assert_array_almost_equal` [bad-argument-type]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:589:72-73: Index 4 out of range for tuple with 4 elements [bad-index]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:590:70-71: Index 4 out of range for tuple with 4 elements [bad-index]
- ERROR sklearn/cluster/tests/test_hierarchical.py:752:9-60: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 4) into 5 values [bad-unpacking]

... (truncated 2544 lines) ...

openlibrary (https://github.com/internetarchive/openlibrary)
- ERROR openlibrary/core/admin.py:103:73-86: Type `Coroutine[Unknown, Unknown, Unknown]` is not iterable [not-iterable]
- ERROR openlibrary/core/admin.py:139:78-86: Type `Coroutine[Unknown, Unknown, Unknown]` is not iterable [not-iterable]
- ERROR openlibrary/core/observations.py:600:16-40: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/core/observations.py:601:32-56: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/core/observations.py:602:17-41: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/core/observations.py:604:24-48: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/core/observations.py:1111:39-64: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/core/observations.py:1112:40-65: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/plugins/openlibrary/home.py:157:42-46: Argument `Coroutine[Unknown, Unknown, Unknown] | Unknown` is not assignable to parameter `seq` with type `SupportsLenAndGetItem[@_]` in function `random.Random.choice` [bad-argument-type]
- ERROR openlibrary/views/loanstats.py:126:5-17: Object of class `Coroutine` has no attribute `update` [missing-attribute]
+ ERROR openlibrary/views/loanstats.py:126:17-56: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, dict[str, list[Unknown]]]) [no-matching-overload]
- ERROR openlibrary/views/loanstats.py:180:36-56: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/views/loanstats.py:186:28-48: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/views/loanstats.py:196:32-52: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- ERROR openlibrary/views/loanstats.py:201:28-48: Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
+ ERROR openlibrary/views/loanstats.py:181:29-40: Type `int` is not iterable [not-iterable]
+ ERROR openlibrary/views/loanstats.py:187:25-36: Type `int` is not iterable [not-iterable]
+ ERROR openlibrary/views/loanstats.py:197:25-36: Type `int` is not iterable [not-iterable]
+ ERROR openlibrary/views/loanstats.py:202:25-36: Type `int` is not iterable [not-iterable]

cloud-init (https://github.com/canonical/cloud-init)
- ERROR cloudinit/cmd/devel/net_convert.py:195:46-52: Argument `dict[str, int | list[dict[Unknown, Unknown]]] | dict[str, int | Unknown] | dict[Unknown, Unknown] | Unknown | None` is not assignable to parameter `net_config` with type `dict[Unknown, Unknown]` in function `cloudinit.net.network_state.parse_net_config_data` [bad-argument-type]
+ ERROR cloudinit/cmd/devel/net_convert.py:195:46-52: Argument `dict[str, int | list[dict[Unknown, Unknown]]] | dict[str, int | Unknown] | dict[Unknown, Unknown] | Any | None` is not assignable to parameter `net_config` with type `dict[Unknown, Unknown]` in function `cloudinit.net.network_state.parse_net_config_data` [bad-argument-type]
- ERROR cloudinit/config/cc_apt_configure.py:725:21-66: Argument `list[bytes | str]` is not assignable to parameter `args` with type `bytes | list[bytes] | list[str] | str` in function `cloudinit.subp.subp` [bad-argument-type]
- ERROR cloudinit/config/schema.py:1030:23-1032:14: `Unknown | None` is not assignable to variable `content` with type `str` [bad-assignment]
+ ERROR cloudinit/config/schema.py:1030:23-1032:14: `str | Unknown | None` is not assignable to variable `content` with type `str` [bad-assignment]
+ ERROR cloudinit/netinfo.py:355:16-20: Returned type `dict[str | Unknown, dict[str, bool | list[Unknown] | str]] | dict[Unknown, dict[str, Unknown]] | dict[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[str | Unknown, dict[str, bool | list[Unknown] | str]] | dict[Unknown, dict[str, Unknown]] | dict[Unknown, Unknown]` is not assignable to declared return type `dict[str, dict[str, Interface]]` [bad-return]
- ERROR cloudinit/sources/DataSourceConfigDrive.py:102:33-55: Argument `list[Mapping[Unknown, Unknown] | dict[str, Unknown] | dict[Unknown, Unknown] | int | str | Unknown]` is not assignable to parameter `sources` with type `Sequence[Mapping[Unknown, Unknown]]` in function `cloudinit.util.mergemanydict` [bad-argument-type]
+ ERROR cloudinit/sources/DataSourceConfigDrive.py:102:33-55: Argument `list[Mapping[Unknown, Unknown] | dict[str, dict[Unknown, Unknown] | Unknown] | dict[Unknown, Unknown] | int | str | Unknown]` is not assignable to parameter `sources` with type `Sequence[Mapping[Unknown, Unknown]]` in function `cloudinit.util.mergemanydict` [bad-argument-type]
- ERROR cloudinit/sources/DataSourceConfigDrive.py:138:29-56: `dict[str, Unknown] | int | str | Unknown | None` is not assignable to attribute `ec2_metadata` with type `str` [bad-assignment]
+ ERROR cloudinit/sources/DataSourceConfigDrive.py:138:29-56: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str | Unknown | None` is not assignable to attribute `ec2_metadata` with type `str` [bad-assignment]
- ERROR cloudinit/sources/DataSourceConfigDrive.py:139:29-52: `dict[str, Unknown] | int | str | Unknown | None` is not assignable to attribute `userdata_raw` with type `bytes | str | None` [bad-assignment]
+ ERROR cloudinit/sources/DataSourceConfigDrive.py:139:29-52: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str | Unknown | None` is not assignable to attribute `userdata_raw` with type `bytes | str | None` [bad-assignment]
- ERROR cloudinit/sources/DataSourceConfigDrive.py:141:26-52: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, Unknown] | dict[Unknown, Unknown] | int | str | Unknown) [no-matching-overload]
+ ERROR cloudinit/sources/DataSourceConfigDrive.py:141:26-52: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, dict[Unknown, Unknown] | Unknown] | dict[Unknown, Unknown] | int | str | Unknown) [no-matching-overload]
- ERROR cloudinit/sources/DataSourceConfigDrive.py:161:29-55: `dict[str, Unknown] | int | str | Unknown | None` is not assignable to attribute `network_json` with type `str | None` [bad-assignment]
+ ERROR cloudinit/sources/DataSourceConfigDrive.py:161:29-55: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str | Unknown | None` is not assignable to attribute `network_json` with type `str | None` [bad-assignment]
- ERROR cloudinit/sources/DataSourceEc2.py:732:9-17: Class member `DataSourceEc2Local.get_data` overrides parent class `DataSourceEc2` in an inconsistent manner [bad-override]
+ ERROR cloudinit/sources/DataSourceEc2.py:590:45-597:14: Cannot set item in `dict[str, bytes]` [unsupported-operation]
+ ERROR cloudinit/sources/DataSourceEc2.py:606:47-78: Cannot set item in `dict[str, bytes]` [unsupported-operation]
+ ERROR cloudinit/sources/DataSourceEc2.py:614:53-64: Cannot set item in `dict[str, bytes]` [unsupported-operation]
+ ERROR cloudinit/sources/DataSourceSmartOS.py:519:29-33: Argument `Literal['\n']` is not assignable to parameter `sep` with type `Buffer | None` in function `bytes.split` [bad-argument-type]
+ ERROR cloudinit/sources/DataSourceSmartOS.py:684:61-67: Argument `Literal['b64-']` is not assignable to parameter `prefix` with type `Buffer | tuple[Buffer, ...]` in function `bytes.startswith` [bad-argument-type]
- ERROR cloudinit/sources/DataSourceSmartOS.py:716:40-50: Object of class `NoneType` has no attribute `encode` [missing-attribute]
+ ERROR cloudinit/sources/DataSourceSmartOS.py:716:40-50: Object of class `NoneType` has no attribute `encode`
+ Object of class `bytes` has no attribute `encode` [missing-attribute]
+ ERROR cloudinit/sources/helpers/openstack.py:242:33-246:14: Cannot set item in `dict[str, tuple[None, bool, (text: Unknown, root_types: tuple[type[dict]] | Unknown = ...) -> dict[Unknown, Unknown]]]` [unsupported-operation]
- ERROR doc/rtd/conf.py:332:13-80: `+=` is not supported between `LiteralString` and `None` [unsupported-operation]
+ ERROR doc/rtd/conf.py:332:13-80: `+=` is not supported between `str` and `None` [unsupported-operation]
- ERROR doc/rtd/conf.py:378:13-380:14: `+=` is not supported between `Literal['']` and `None` [unsupported-operation]
+ ERROR doc/rtd/conf.py:378:13-380:14: `+=` is not supported between `str` and `None` [unsupported-operation]
- ERROR tests/unittests/sources/test_configdrive.py:405:27-44: `dict[str, Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
+ ERROR tests/unittests/sources/test_configdrive.py:405:27-44: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
- ERROR tests/unittests/sources/test_configdrive.py:446:27-32: `dict[str, Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
+ ERROR tests/unittests/sources/test_configdrive.py:446:27-32: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
- ERROR tests/unittests/sources/test_configdrive.py:475:31-37: `dict[str, Unknown] | int | str` is not assignable to attribute `ec2_metadata` with type `str` [bad-assignment]
+ ERROR tests/unittests/sources/test_configdrive.py:475:31-37: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str` is not assignable to attribute `ec2_metadata` with type `str` [bad-assignment]
- ERROR tests/unittests/sources/test_configdrive.py:476:27-32: `dict[str, Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
+ ERROR tests/unittests/sources/test_configdrive.py:476:27-32: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
- ERROR tests/unittests/sources/test_configdrive.py:511:31-37: `dict[str, Unknown] | int | str` is not assignable to attribute `ec2_metadata` with type `str` [bad-assignment]
+ ERROR tests/unittests/sources/test_configdrive.py:511:31-37: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str` is not assignable to attribute `ec2_metadata` with type `str` [bad-assignment]
- ERROR tests/unittests/sources/test_configdrive.py:512:27-32: `dict[str, Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]
+ ERROR tests/unittests/sources/test_configdrive.py:512:27-32: `dict[str, dict[Unknown, Unknown] | Unknown] | int | str` is not assignable to attribute `metadata` with type `dict[Unknown, Unknown]` [bad-assignment]

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ ERROR test/mitmproxy/addons/test_clientplayback.py:217:26-40: Argument `Literal['/nonexistent']` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.clientplayback.ClientPlayback.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:35:22-33: Argument `Literal[':default:']` is not assignable to parameter `marker` with type `Marker` in function `mitmproxy.addons.core.Core.mark` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:39:26-35: Argument `Literal['invalid']` is not assignable to parameter `marker` with type `Marker` in function `mitmproxy.addons.core.Core.mark` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:142:25-26: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.core.Core.options_save` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:144:29-32: Argument `Literal['/']` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.core.Core.options_save` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:148:25-26: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.core.Core.options_load` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:151:25-39: Argument `Literal['/nonexistent']` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.core.Core.options_load` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_core.py:156:29-30: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.core.Core.options_load` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:165:30-48: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:166:30-48: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:167:30-46: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:168:30-46: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:169:30-46: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:170:30-45: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:171:30-49: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:172:30-56: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:173:30-57: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:175:30-54: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:176:30-49: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:177:30-50: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:178:30-66: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:179:30-37: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:181:34-46: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:185:30-49: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:186:30-54: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:192:34-52: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_cut.py:193:34-53: Argument `list[str]` is not assignable to parameter `cuts` with type `CutSpec` in function `mitmproxy.addons.cut.Cut.cut` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_export.py:346:55-56: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.export.Export.file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_save.py:120:43-44: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.save.Save.save` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_save.py:122:43-44: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.save.Save.save` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_save.py:124:43-50: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.save.Save.save` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_save.py:128:47-60: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.save.Save.save` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_script.py:199:49-52: Argument `Literal['/']` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.script.ScriptLoader.script_run` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_serverplayback.py:25:21-26: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.serverplayback.ServerPlayback.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_serverplayback.py:28:25-39: Argument `Literal['/nonexistent']` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.serverplayback.ServerPlayback.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_view.py:256:17-21: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.view.View.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_view.py:258:17-21: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.view.View.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_view.py:261:21-44: Argument `Literal['nonexistent_file_path']` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.view.View.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/addons/test_view.py:266:17-21: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.view.View.load_file` [bad-argument-type]
+ ERROR test/mitmproxy/tools/web/test_static_viewer.py:66:43-66: Argument `str` is not assignable to parameter `path` with type `Path` in function `mitmproxy.addons.save.Save.save` [bad-argument-type]

bokeh (https://github.com/bokeh/bokeh)
+ ERROR src/bokeh/model/model.py:100:27-31: Cannot index into `Parameter` [bad-index]
+ ERROR src/bokeh/plotting/_decorators.py:51:77-81: Cannot index into `Parameter` [bad-index]

sphinx (https://github.com/sphinx-doc/sphinx)
+ ERROR sphinx/jinja2glue.py:203:46-53: Cannot set item in `dict[str, ((obj: Sized, /) -> int) | ((s: Any, /) -> Markup) | ((s: Any, /) -> str) | ((env: Environment, s: str, length: int = 255, killwords: bool = False, end: str = '...', leeway: int | None = None) -> str) | ((environment: Environment, obj: Any, name: str) -> Undefined | Any) | ((environment: Environment, s: str, width: int = 79, break_long_words: bool = True, wrapstring: str | None = None, break_on_hyphens: bool = True) -> str) | ((eval_ctx: EvalContext, d: Mapping[str, Any], autospace: bool = True) -> str) | ((eval_ctx: EvalContext, s: str, old: str, new: str, count: int | None = None) -> str) | ((eval_ctx: EvalContext, value: AsyncIterable[Any] | Iterable[Any], d: str = '', attribute: int | str | None = None) -> Coroutine[Unknown, Unknown, str]) | ((eval_ctx: EvalContext, value: str, trim_url_limit: int | None = None, nofollow: bool = False, target: str | None = None, rel: str | None = None, extra_schemes: Iterable[str] | None = None) -> str) | ((eval_ctx: EvalContext, value: Any, indent: int | None = None) -> Markup) | ((s: str) -> int) | ((s: str) -> str) | ((s: str, width: int | str = 4, first: bool = False, blank: bool = False) -> str) | ((value: HasHTML | str) -> Markup) | ((value: HasHTML | str) -> str) | ((value: Iterable[tuple[str, Any]] | Mapping[str, Any] | str) -> str) | ((value: float | int | str, binary: bool = False) -> str) | ((value: float, precision: int = 0, method: Literal['ceil', 'common', 'floor'] = 'common') -> float) | ((value: str) -> Markup) | ((value: str, chars: str | None = None) -> str) | ((value: str, width: int = 80) -> str) | ((value: str, *args: Any, **kwargs: Any) -> str) | ((value: Any) -> str) | ((value: Any, default: float = ...) -> float) | ((value: Any, default: int = 0, base: int = 10) -> int) | Overload[(context: Context, value: AsyncIterable[Any] | Iterable[Any], name: str, *args: Any, **kwargs: Any) -> Iterable[Any], (context: Context, value: AsyncIterable[Any] | Iterable[Any], *, attribute: str = ..., default: Any | None = None) -> Iterable[Any]] | Overload[(value: str) -> str, [V](value: Iterable[Unknown]) -> Iterable[Unknown]] | [K, V](value: Mapping[K, V], case_sensitive: bool = False, by: Literal['key', 'value'] = 'key', reverse: bool = False) -> list[tuple[K, V]] | [K, V](value: Mapping[K, V] | Undefined) -> Iterator[tuple[K, V]] | [V](value: Iterable[V], linecount: int, fill_with: V | None = None) -> Iterator[list[V]] | [V](value: V, default_value: V = ..., boolean: bool = False) -> V | [V, V](environment: Environment, seq: AsyncIterable[V] | Iterable[V]) -> Coroutine[Unknown, Unknown, Undefined | V] | [V, V](environment: Environment, value: AsyncIterable[V] | Iterable[V], attribute: int | str, default: Any | None = None, case_sensitive: bool = False) -> Coroutine[Unknown, Unknown, list[_GroupTuple]] | [V](environment: Environment, seq: Reversible[V]) -> Undefined | V | [V, V](value: AsyncIterable[V] | Iterable[V]) -> Coroutine[Unknown, Unknown, list[V]] | [V](environment: Environment, value: Iterable[V], case_sensitive: bool = False, attribute: int | str | None = None) -> Undefined | V | [V](context: Context, seq: Sequence[V]) -> Undefined | V | [V, V](context: Context, value: AsyncIterable[V] | Iterable[V], *args: Any, **kwargs: Any) -> Coroutine[Unknown, Unknown, AsyncIterator[V]] | [V, V](value: AsyncIterable[V] | Iterable[V], slices: int, fill_with: Any | None = None) -> Coroutine[Unknown, Unknown, Iterator[list[V]]] | [V](environment: Environment, value: Iterable[V], reverse: bool = False, case_sensitive: bool = False, attribute: int | str | None = None) -> list[V] | [V, V](environment: Environment, iterable: AsyncIterable[V] | Iterable[V], attribute: int | str | None = None, start: V = ...) -> Coroutine[Unknown, Unknown, V] | [V, V](environment: Environment, value: AsyncIterable[V] | Iterable[V], case_sensitive: bool = False, attribute: int | str | None = None) -> Coroutine[Unknown, Unknown, Iterator[V]] | [_T](x: SupportsAbs[_T], /) -> _T]` [unsupported-operation]
+ ERROR sphinx/jinja2glue.py:204:45-51: Cannot set item in `dict[str, ((obj: Sized, /) -> int) | ((s: Any, /) -> Markup) | ((s: Any, /) -> str) | ((env: Environment, s: str, length: int = 255, killwords: bool = False, end: str = '...', leeway: int | None = None) -> str) | ((environment: Environment, obj: Any, name: str) -> Undefined | Any) | ((environment: Environment, s: str, width: int = 79, break_long_words: bool = True, wrapstring: str | None = None, break_on_hyphens: bool = True) -> str) | ((eval_ctx: EvalContext, d: Mapping[str, Any], autospace: bool = True) -> str) | ((eval_ctx: EvalContext, s: str, old: str, new: str, count: int | None = None) -> str) | ((eval_ctx: EvalContext, value: AsyncIterable[Any] | Iterable[Any], d: str = '', attribute: int | str | None = None) -> Coroutine[Unknown, Unknown, str]) | ((eval_ctx: EvalContext, value: str, trim_url_limit: int | None = None, nofollow: bool = False, target: str | None = None, rel: str | None = None, extra_schemes: Iterable[str] | None = None) -> str) | ((eval_ctx: EvalContext, value: Any, indent: int | None = None) -> Markup) | ((s: str) -> int) | ((s: str) -> str) | ((s: str, width: int | str = 4, first: bool = False, blank: bool = False) -> str) | ((value: HasHTML | str) -> Markup) | ((value: HasHTML | str) -> str) | ((value: Iterable[tuple[str, Any]] | Mapping[str, Any] | str) -> str) | ((value: float | int | str, binary: bool = False) -> str) | ((value: float, precision: int = 0, method: Literal['ceil', 'common', 'floor'] = 'common') -> float) | ((value: str) -> Markup) | ((value: str, chars: str | None = None) -> str) | ((value: str, width: int = 80) -> str) | ((value: str, *args: Any, **kwargs: Any) -> str) | ((value: Any) -> str) | ((value: Any, default: float = ...) -> float) | ((value: Any, default: int = 0, base: int = 10) -> int) | Overload[(context: Context, value: AsyncIterable[Any] | Iterable[Any], name: str, *args: Any, **kwargs: Any) -> Iterable[Any], (context: Context, value: AsyncIterable[Any] | Iterable[Any], *, attribute: str = ..., default: Any | None = None) -> Iterable[Any]] | Overload[(value: str) -> str, [V](value: Iterable[Unknown]) -> Iterable[Unknown]] | [K, V](value: Mapping[K, V], case_sensitive: bool = False, by: Literal['key', 'value'] = 'key', reverse: bool = False) -> list[tuple[K, V]] | [K, V](value: Mapping[K, V] | Undefined) -> Iterator[tuple[K, V]] | [V](value: Iterable[V], linecount: int, fill_with: V | None = None) -> Iterator[list[V]] | [V](value: V, default_value: V = ..., boolean: bool = False) -> V | [V, V](environment: Environment, seq: AsyncIterable[V] | Iterable[V]) -> Coroutine[Unknown, Unknown, Undefined | V] | [V, V](environment: Environment, value: AsyncIterable[V] | Iterable[V], attribute: int | str, default: Any | None = None, case_sensitive: bool = False) -> Coroutine[Unknown, Unknown, list[_GroupTuple]] | [V](environment: Environment, seq: Reversible[V]) -> Undefined | V | [V, V](value: AsyncIterable[V] | Iterable[V]) -> Coroutine[Unknown, Unknown, list[V]] | [V](environment: Environment, value: Iterable[V], case_sensitive: bool = False, attribute: int | str | None = None) -> Undefined | V | [V](context: Context, seq: Sequence[V]) -> Undefined | V | [V, V](context: Context, value: AsyncIterable[V] | Iterable[V], *args: Any, **kwargs: Any) -> Coroutine[Unknown, Unknown, AsyncIterator[V]] | [V, V](value: AsyncIterable[V] | Iterable[V], slices: int, fill_with: Any | None = None) -> Coroutine[Unknown, Unknown, Iterator[list[V]]] | [V](environment: Environment, value: Iterable[V], reverse: bool = False, case_sensitive: bool = False, attribute: int | str | None = None) -> list[V] | [V, V](environment: Environment, iterable: AsyncIterable[V] | Iterable[V], attribute: int | str | None = None, start: V = ...) -> Coroutine[Unknown, Unknown, V] | [V, V](environment: Environment, value: AsyncIterable[V] | Iterable[V], case_sensitive: bool = False, attribute: int | str | None = None) -> Coroutine[Unknown, Unknown, Iterator[V]] | [_T](x: SupportsAbs[_T], /) -> _T]` [unsupported-operation]
+ ERROR sphinx/jinja2glue.py:206:51-63: Cannot set item in `dict[str, ((obj: Sized, /) -> int) | ((s: Any, /) -> Markup) | ((s: Any, /) -> str) | ((env: Environment, s: str, length: int = 255, killwords: bool = False, end: str = '...', leeway: int | None = None) -> str) | ((environment: Environment, obj: Any, name: str) -> Undefined | Any) | ((environment: Environment, s: str, width: int = 79, break_long_words: bool = True, wrapstring: str | None = None, break_on_hyphens: bool = True) -> str) | ((eval_ctx: EvalContext, d: Mapping[str, Any], autospace: bool = True) -> str) | ((eval_ctx: EvalContext, s: str, old: str, new: str, count: int | None = None) -> str) | ((eval_ctx: EvalContext, value: AsyncIterable[Any] | Iterable[Any], d: str = '', attribute: int | str | None = None) -> Coroutine[Unknown, Unknown, str]) | ((eval_ctx: EvalContext, value: str, trim_url_limit: int | None = None, nofollow: bool = False, target: str | None = None, rel: str | None = None, extra_schemes: Iterable[str] | None = None) -> str) | ((eval_ctx: EvalContext, value: Any, indent: int | None = None) -> Markup) | ((s: str) -> int) | ((s: str) -> str) | ((s: str, width: int | str = 4, first: bool = False, blank: bool = False) -> str) | ((value: HasHTML | str) -> Markup) | ((value: HasHTML | str) -> str) | ((value: Iterable[tuple[str, Any]] | Mapping[str, Any] | str) -> str) | ((value: float | int | str, binary: bool = False) -> str) | ((value: float, precision: int = 0, method: Literal['ceil', 'common', 'floor'] = 'common') -> float) | ((value: str) -> Markup) | ((value: str, chars: str | None = None) -> str) | ((value: str, width: int = 80) -> str) | ((value: str, *args: Any, **kwargs: Any) -> str) | ((value: Any) -> str) | ((value: Any, default: float = ...) -> float) | ((value: Any, default: int = 0, base: int = 10) -> int) | Overload[(context: Context, value: AsyncIterable[Any] | Iterable[Any], name: str, *args: Any, **kwargs: Any) -> Iterable[Any], (context: Context, value: AsyncIterable[Any] | Iterable[Any], *, attribute: str = ..., default: Any | None = None) -> Iterable[Any]] | Overload[(value: str) -> str, [V](value: Iterable[Unknown]) -> Iterable[Unknown]] | [K, V](value: Mapping[K, V], case_sensitive: bool = False, by: Literal['key', 'value'] = 'key', reverse: bool = False) -> list[tuple[K, V]] | [K, V](value: Mapping[K, V] | Undefined) -> Iterator[tuple[K, V]] | [V](value: Iterable[V], linecount: int, fill_with: V | None = None) -> Iterator[list[V]] | [V](value: V, default_value: V = ..., boolean: bool = False) -> V | [V, V](environment: Environment, seq: AsyncIterable[V] | Iterable[V]) -> Coroutine[Unknown, Unknown, Undefined | V] | [V, V](environment: Environment, value: AsyncIterable[V] | Iterable[V], attribute: int | str, default: Any | None = None, case_sensitive: bool = False) -> Coroutine[Unknown, Unknown, list[_GroupTuple]] | [V](environment: Environment, seq: Reversible[V]) -> Undefined | V | [V, V](value: AsyncIterable[V] | Iterable[V]) -> Coroutine[Unknown, Unknown, list[V]] | [V](environment: Environment, value: Iterable[V], case_sensitive: bool = False, attribute: int | str | None = None) -> Undefined | V | [V](context: Context, seq: Sequence[V]) -> Undefined | V | [V, V](context: Context, value: AsyncIterable[V] | Iterable[V], *args: Any, **kwargs: Any) -> Coroutine[Unknown, Unknown, AsyncIterator[V]] | [V, V](value: AsyncIterable[V] | Iterable[V], slices: int, fill_with: Any | None = None) -> Coroutine[Unknown, Unknown, Iterator[list[V]]] | [V](environment: Environment, value: Iterable[V], reverse: bool = False, case_sensitive: bool = False, attribute: int | str | None = None) -> list[V] | [V, V](environment: Environment, iterable: AsyncIterable[V] | Iterable[V], attribute: int | str | None = None, start: V = ...) -> Coroutine[Unknown, Unknown, V] | [V, V](environment: Environment, value: AsyncIterable[V] | Iterable[V], case_sensitive: bool = False, attribute: int | str | None = None) -> Coroutine[Unknown, Unknown, Iterator[V]] | [_T](x: SupportsAbs[_T], /) -> _T]` [unsupported-operation]

jinja (https://github.com/pallets/jinja)
+ ERROR src/jinja2/filters.py:1501:5-11: Overload return type `Iterable[Any]` is not assignable to implementation return type `AsyncIterable[Any]` [inconsistent-overload]
+ ERROR src/jinja2/filters.py:1511:5-11: Overload return type `Iterable[Any]` is not assignable to implementation return type `AsyncIterable[Any]` [inconsistent-overload]

@github-actions
Copy link

Primer Diff Classification

❌ 3 regression(s) | ✅ 4 improvement(s) | ➖ 1 neutral | ❓ 1 needs review | 9 project(s) total | +2503, -95 errors

3 regression(s) across scikit-learn, cloud-init, bokeh. error kinds: bad-argument-type, bad-assignment, bad-index. caused by apply_function_decorator(). 4 improvement(s) across ibis, openlibrary, mitmproxy, jinja.

Project Verdict Changes Error Kinds Root Cause
ibis ✅ Improvement +75, -3 bad-argument-type, bad-return apply_function_decorator()
cki-lib ➖ Neutral +2, -2 missing-attribute
scikit-learn ❌ Regression +2351, -58 bad-argument-count, bad-argument-type pyrefly/lib/alt/function.rs
openlibrary ✅ Improvement +5, -14 bad-argument-type, bad-index apply_function_decorator()
cloud-init ❌ Regression +23, -18 bad-argument-type, bad-assignment apply_function_decorator()
mitmproxy ✅ Improvement +40 bad-argument-type pyrefly/lib/alt/function.rs
bokeh ❌ Regression +2 bad-index pyrefly/lib/alt/function.rs
sphinx ❓ Needs Review +3 unsupported-operation
jinja ✅ Improvement +2 inconsistent-overload pyrefly/lib/alt/function.rs
Detailed analysis

❌ Regression (3)

scikit-learn (+2351, -58)

The PR aimed to fix false positive bad-argument-count errors on dual-use decorators by preserving the original function's type when a decorator returns an unannotated passthrough wrapper. However, this heuristic is being applied too broadly in sklearn, causing cross_val_predict to return the wrong type. Looking at the errors, predictions from cross_val_predict is being inferred as having attributes like reshape and dtype (which arrays have) but pyrefly now thinks it's a different type. The massive number of missing-attribute errors on tuple and list suggests pyrefly is incorrectly inferring collection types instead of numpy arrays. This is a regression - the PR's heuristic is misidentifying sklearn's decorators and breaking type inference.
Attribution: The changes to apply_function_decorator in pyrefly/lib/alt/function.rs that add special handling for unannotated passthrough decorators are causing sklearn's cross_val_predict to return incorrect types, leading to cascading type errors throughout the codebase.

cloud-init (+23, -18)

This is a regression. The PR aimed to fix false positive errors with unannotated decorators, and it did remove some errors (18 removed). However, it introduced more errors (23 added) by causing pyrefly to infer Unknown types in places where it previously had more specific type information. The new errors show Unknown appearing in unions like str | Unknown | None where pyrefly likely had concrete types before. Since most new errors are pyrefly-only (not reported by mypy/pyright), they are likely false positives from degraded type inference rather than real bugs being caught.
Attribution: The changes in pyrefly/lib/alt/function.rs to apply_function_decorator() modified how decorator return types are handled. When a decorator returns an unannotated passthrough wrapper or a union containing one, pyrefly now preserves the original function's type. This appears to have improved type inference in some cases (removing false positives) but degraded it in others (introducing Unknown types where concrete types were previously inferred).

bokeh (+2)

These are false positives. The parameters() method returns list[tuple[Parameter, str, str]] (see lines 298, 325, 332 where tuples are created), but pyrefly is incorrectly inferring the return type as list[Parameter]. The code correctly indexes x[0] to extract the Parameter from each tuple. This is a regression in type inference likely caused by the PR's changes to decorator handling affecting how the return type is inferred.
Attribution: The changes to apply_function_decorator in pyrefly/lib/alt/function.rs that preserve types through unannotated passthrough decorators likely affected type inference for the parameters() method, causing pyrefly to incorrectly infer its return type

✅ Improvement (4)

ibis (+75, -3)

This is an improvement. The PR fixed a decorator inference bug that was producing false positives (the 3 removed bad-return errors). By correctly preserving the original function's type through unannotated passthrough decorators, pyrefly can now properly type-check the decorated functions, revealing 75 real type errors that were previously hidden. The high co-reporting rate with pyright (64/75) confirms these new errors are catching real bugs, not introducing false positives.
Attribution: The changes to apply_function_decorator() in pyrefly/lib/alt/function.rs now preserve the original function's type when a decorator returns an unannotated passthrough wrapper (or a union containing one). This fixed the false positive bad-return errors but also properly exposed previously-hidden type errors in the decorated functions.

openlibrary (+5, -14)

Pyrefly improved by fixing false positives about Coroutine types (14 removed errors) and now correctly catches 5 real bugs that pyright also reports. The PR's decorator handling changes fixed incorrect type inference that was masking actual type errors in the code.
Attribution: The changes to apply_function_decorator() in pyrefly/lib/alt/function.rs that add special handling for unannotated passthrough decorators fixed the false positive Coroutine inference. The new logic preserves the original function's type when a decorator returns an unannotated wrapper.

mitmproxy (+40)

The PR successfully fixed the decorator type inference issue it set out to fix. As a side effect, it exposed 40 pre-existing type mismatches in test files where literal strings are passed to parameters expecting Path or other specific types. These are genuine type issues that were previously masked by the decorator bug. Since pyright also flags these errors, pyrefly is now correctly catching real type mismatches that were hidden before. This is an improvement - the type checker is more accurate.
Attribution: The changes to apply_function_decorator in pyrefly/lib/alt/function.rs now preserve the original function's type signature when decorated with unannotated passthrough decorators. This means parameter types that were previously lost (becoming Any) are now preserved, exposing pre-existing type mismatches.

jinja (+2)

Pyrefly correctly identified that the overload return types (Iterable[Any]) are incompatible with the async implementation return type (AsyncIterable[Any]). The @async_variant decorator transforms the sync function into an async one, but the overloads weren't updated to reflect this. This is a real type error that violates the overload compatibility rules in the typing spec.
Attribution: The fix to apply_function_decorator in pyrefly/lib/alt/function.rs now preserves the original function type for unannotated passthrough decorators. This improved type preservation likely made pyrefly correctly infer the async nature of the @async_variant decorated function, exposing this pre-existing overload inconsistency.

➖ Neutral (1)

cki-lib (+2, -2)

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

❓ Needs Review (1)

sphinx (+3)

LLM requested additional files that could not be resolved. Non-trivial change (3 added, 0 removed).

Suggested fixes

Summary: The unannotated passthrough decorator heuristic is being applied too broadly, causing type inference regressions in scikit-learn, cloud-init, and bokeh.

1. In apply_function_decorator() in pyrefly/lib/alt/function.rs, add an additional guard to the unannotated passthrough check: only apply this heuristic when the decorator is a simple function (not a method or complex expression). Add: if let Type::Function(f) = &decorator_ty { if f.[is_simple_decorator()](https://github.com/facebook/pyrefly/blob/main/pyrefly/lib/alt/function.rs) { ... } } where is_simple_decorator checks that the function has no class context and comes from a simple name binding.

Files: pyrefly/lib/alt/function.rs
Confidence: high
Affected projects: scikit-learn, cloud-init, bokeh
Fixes: missing-attribute, bad-assignment, bad-argument-type, bad-index
The current heuristic matches any callable with (*args, **kwargs) -> Any signature, but this is too broad. In scikit-learn, cloud-init, and bokeh, complex decorators or method decorators are being misidentified as simple passthroughs. By restricting the heuristic to only simple function decorators (not methods, not complex expressions), we preserve the fix for the original dual-use decorator case while avoiding false matches. Expected outcome: eliminates 2376 errors in scikit-learn, 17 pyrefly-only errors in cloud-init, and 2 errors in bokeh.

2. In is_unannotated_passthrough() in crates/pyrefly_types/src/callable.rs, add a stricter check for implicit Any types: verify that the Any types come from missing annotations (have AnyReason::Implicit or AnyReason::MissingAnnotation) rather than explicit Any annotations. Change the check to: ty.[is_any()](https://github.com/facebook/pyrefly/blob/main/crates/pyrefly_types/src/callable.rs) && matches!(ty.[any_reason()](https://github.com/facebook/pyrefly/blob/main/crates/pyrefly_types/src/callable.rs), Some(AnyReason::Implicit | AnyReason::MissingAnnotation))

Files: crates/pyrefly_types/src/callable.rs
Confidence: medium
Affected projects: cloud-init
Fixes: bad-assignment, bad-argument-type
The current check accepts any Any-typed parameters, but we should only match truly unannotated functions. Explicit Any annotations indicate intentional typing, not a passthrough wrapper. This would prevent matching decorators that explicitly type their parameters as Any. Expected outcome: reduces false matches in cloud-init where Unknown types are being introduced.


Was this helpful? React with 👍 or 👎

Classification by primer-classifier (1 heuristic, 8 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.

Handling dual-use decorator

2 participants