Skip to content

[ty] support for typing.Concatenate#23119

Closed
choucavalier wants to merge 1 commit intoastral-sh:mainfrom
choucavalier:main
Closed

[ty] support for typing.Concatenate#23119
choucavalier wants to merge 1 commit intoastral-sh:mainfrom
choucavalier:main

Conversation

@choucavalier
Copy link

@choucavalier choucavalier commented Feb 6, 2026

Summary

Implements basic Concatenate[T, P] support in ty, replacing three todo_type!() / Parameters::todo() stubs with real parameter extraction. This eliminates false positive missing-argument and invalid-return-type errors when decorators use Concatenate to strip prefix parameters.

Changes

  • Parsing (type_expression.rs, builder.rs): Extract prefix types from Concatenate[...] as positional-only parameters, with the last argument handled as either ... (gradual form) or a ParamSpec. Applied in both infer_callable_parameter_types and infer_paramspec_explicit_specialization_value.
  • Constraint matching (signatures.rs): Detect Concatenate-style parameter lists ([prefix..., *P.args, **P.kwargs]) via find_paramspec_from_args_kwargs, match prefix types, and bind the ParamSpec to remaining parameters. Added Parameters::into_gradual() for the Concatenate[T, ...] form.
  • Display (display.rs): Show prefix parameters in gradual Concatenate forms instead of collapsing to (...).
  • Workaround removal (builder.rs): Remove the Callable[<subscript>, ...]UnknownGeneric short-circuit.

Known regression

abstractclassmethod.__init__ uses Callable[Concatenate[type[_T], _P], _R_co] in typeshed. With Concatenate now producing real types, this surfaces a pre-existing false positive (tracked with a TODO in final.md).

Test Plan

  • New generics/concatenate.md with tests for gradual form, ParamSpec form, decorator stripping, and multiple prefix parameters
  • Updated expectations in callable.md, paramspec.md, pep613_type_aliases.md, and final.md

@AlexWaygood AlexWaygood added the ty Multi-file analysis & type inference label Feb 6, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 6, 2026

Typing conformance results improved 🎉

The percentage of diagnostics emitted that were expected errors increased from 83.87% to 84.21%. The percentage of expected errors that received a diagnostic increased from 74.82% to 75.67%.

Summary

Metric Old New Diff Outcome
True Positives 811 821 +10 ⏫ (✅)
False Positives 156 154 -2 ⏬ (✅)
False Negatives 273 264 -9 ⏬ (✅)
Total Diagnostics 967 975 +8
Precision 83.87% 84.21% +0.34% ⏫ (✅)
Recall 74.82% 75.67% +0.85% ⏫ (✅)

True positives added

Details
Location Name Message
callables_annotation.py:172:26 invalid-assignment Object of type () -> str is not assignable to (int, /, *args: Any, **kwargs: Any) -> str
callables_annotation.py:189:32 invalid-assignment Object of type (int, str, /) -> str is not assignable to (str, /, *args: Any, **kwargs: Any) -> str
generics_paramspec_components.py:70:11
generics_paramspec_components.py:70:18
invalid-argument-type
invalid-argument-type
Argument is incorrect: Expected int, found P@remove.args
Argument is incorrect: Expected P@remove.args, found Literal[1]
generics_paramspec_components.py:72:11 invalid-argument-type Argument is incorrect: Expected int, found P@remove.args
generics_paramspec_semantics.py:120:4 invalid-argument-type Argument is incorrect: Expected str, found Literal[1]
generics_paramspec_semantics.py:127:1 invalid-argument-type Argument to function expects_int_first is incorrect: Expected (int, /, *args: Unknown, **kwargs: Unknown) -> int, found def one(x: str) -> int
generics_paramspec_semantics.py:132:1 invalid-argument-type Argument to function expects_int_first is incorrect: Expected (int, /) -> int, found def two(*, x: int) -> int
generics_paramspec_semantics.py:137:1 invalid-argument-type Argument to function expects_int_first is incorrect: Expected (int, /) -> int, found def three(**kwargs: int) -> int
generics_paramspec_semantics.py:98:4 invalid-argument-type Argument is incorrect: Expected str, found Literal[1]

False positives removed

Details
Location Name Message
aliases_explicit.py:57:5 type-assertion-failure Type Unknown does not match asserted type (int, str, str, /) -> None
aliases_implicit.py:68:5 type-assertion-failure Type Unknown does not match asserted type (int, str, str, /) -> None
generics_paramspec_semantics.py:106:13 missing-argument No argument provided for required parameter **kwargs
generics_paramspec_semantics.py:107:13 missing-argument No arguments provided for required parameters *args, **kwargs

False positives added

Details
Location Name Message
callables_annotation.py:175:26 invalid-assignment Object of type (int, /) -> str is not assignable to (int, /, *args: Any, **kwargs: Any) -> str
callables_annotation.py:188:32 invalid-assignment Object of type (int, str, /) -> str is not assignable to (int, /, *args: Any, **kwargs: Any) -> str

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 6, 2026

mypy_primer results

Changes were detected when running on open source projects
pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
+ pytest_robotframework/_internal/pytest/robot_file_support.py:45:1: error[invalid-argument-type] Argument is incorrect: Expected `((...) -> Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def _get_failure[**P](og: (Unknown, /, *args: P.args, **kwargs: P.kwargs) -> object, self: Unknown, *args: P.args, **kwargs: P.kwargs) -> Unknown`
- pytest_robotframework/_internal/utils.py:51:16: error[invalid-return-type] Return type does not match returned value: expected `[**P'return](**P'return) -> T`, found `_Wrapped[(...), T@decorator, P@new_fn, T@decorator]`

async-utils (https://github.com/mikeshardmind/async-utils)
+ src/async_utils/gen_transform.py:106:29: error[invalid-assignment] Object of type `def _consumer[**P, Y](laziness_ev: Event, queue: Queue[Y], loop: AbstractEventLoop, cancel_future: Future[None], f: (**P) -> Generator[Y, None, None], /, *args: P.args, **kwargs: P.kwargs) -> None` is not assignable to `ConsumerType[P@_sync_to_async_gen, Y@_sync_to_async_gen]`
- Found 8 diagnostics
+ Found 9 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[Unknown | int | str | ... omitted 3 union elements]`
+ lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[int | bytes | PathLike[str] | ... omitted 3 union elements]`
- lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Unknown | Sized`
+ lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Sized | Unknown`
- lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Unknown | Sized`
+ lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Sized | Unknown`
+ lib/spack/spack/vendor/jsonschema/_format.py:69:30: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(type[Unknown], /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def checks(self, format, raises=...) -> Unknown`
- lib/spack/spack/verify_libraries.py:164:46: error[invalid-argument-type] Argument to function `candidate_matches` is incorrect: Expected `bytes`, found `Unknown | bytes | str | PathLike[str] | PathLike[bytes]`
+ lib/spack/spack/verify_libraries.py:164:46: error[invalid-argument-type] Argument to function `candidate_matches` is incorrect: Expected `bytes`, found `bytes | Unknown | str | PathLike[str] | PathLike[bytes]`
- lib/spack/spack/verify_libraries.py:165:17: error[invalid-assignment] Invalid subscript assignment with key of type `Unknown | bytes | str | PathLike[str] | PathLike[bytes]` and value of type `Unknown | bytes | str | PathLike[str] | PathLike[bytes]` on object of type `dict[bytes, bytes]`
+ lib/spack/spack/verify_libraries.py:165:17: error[invalid-assignment] Invalid subscript assignment with key of type `bytes | Unknown | str | PathLike[str] | PathLike[bytes]` and value of type `bytes | Unknown | str | PathLike[str] | PathLike[bytes]` on object of type `dict[bytes, bytes]`
- lib/spack/spack/verify_libraries.py:170:57: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[Unknown | bytes | str | PathLike[str] | PathLike[bytes]]`
+ lib/spack/spack/verify_libraries.py:170:57: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[bytes | Unknown | str | PathLike[str] | PathLike[bytes]]`
- lib/spack/spack/verify_libraries.py:170:69: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[Unknown | bytes | str | PathLike[str] | PathLike[bytes]]`
+ lib/spack/spack/verify_libraries.py:170:69: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[bytes]`, found `list[bytes | Unknown | str | PathLike[str] | PathLike[bytes]]`
- Found 4384 diagnostics
+ Found 4385 diagnostics

asynq (https://github.com/quora/asynq)
+ asynq/tests/test_decorators.py:55:33: error[too-many-positional-arguments] Too many positional arguments to bound method `__call__`: expected 1, got 2
+ asynq/tests/test_decorators.py:57:42: error[too-many-positional-arguments] Too many positional arguments to bound method `asynq`: expected 1, got 2
+ asynq/tests/test_multiple_inheritance.py:44:36: error[too-many-positional-arguments] Too many positional arguments to bound method `asynq`: expected 1, got 2
- asynq/tests/test_typing.py:47:38: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ asynq/tests/test_tools.py:502:9: error[too-many-positional-arguments] Too many positional arguments to bound method `asynq`: expected 1, got 2
- Found 190 diagnostics
+ Found 193 diagnostics

scrapy (https://github.com/scrapy/scrapy)
+ scrapy/middleware.py:152:33: error[invalid-argument-type] Argument is incorrect: Expected `_P@methods.args`, found `Spider`
- scrapy/utils/python.py:152:13: error[invalid-assignment] Invalid subscript assignment with key of type `_SelfT@new_method` and value of type `_T@memoizemethod_noargs` on object of type `WeakKeyDictionary[TypeVar, _T@memoizemethod_noargs]`
- scrapy/utils/python.py:153:16: error[invalid-argument-type] Method `__getitem__` of type `bound method WeakKeyDictionary[TypeVar, _T@memoizemethod_noargs].__getitem__(key: TypeVar) -> _T@memoizemethod_noargs` cannot be called with key of type `_SelfT@new_method` on object of type `WeakKeyDictionary[TypeVar, _T@memoizemethod_noargs]`
+ tests/test_contracts.py:331:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:336:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:343:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:350:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:375:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMetaMock`
+ tests/test_contracts.py:385:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `<class 'ResponseMetaMock'>`
+ tests/test_contracts.py:394:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMetaMock`
+ tests/test_contracts.py:403:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:408:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:413:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:418:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:423:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:431:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:440:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:445:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:450:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:455:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:462:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:480:26: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:576:30: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_contracts.py:590:30: error[invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ tests/test_downloadermiddleware_offsite.py:90:44: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Response, /, *args: Any, **kwargs: Any) -> Any) | None`, found `Unknown | dict[Unknown, Unknown]`
+ tests/test_http_request.py:322:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Response, /, *args: Any, **kwargs: Any) -> Any) | None`, found `Literal["a_function"]`
+ tests/test_http_request.py:328:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Response, /, *args: Any, **kwargs: Any) -> Any) | None`, found `Literal["a_function"]`
- Found 1777 diagnostics
+ Found 1800 diagnostics

starlette (https://github.com/encode/starlette)
- starlette/applications.py:69:25: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ServerErrorMiddleware'>`
- starlette/applications.py:71:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ExceptionMiddleware'>`
- tests/middleware/test_base.py:84:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/middleware/test_base.py:152:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'aMiddleware'>`
- tests/middleware/test_base.py:153:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'bMiddleware'>`
- tests/middleware/test_base.py:154:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'cMiddleware'>`
- tests/middleware/test_base.py:169:75: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/middleware/test_base.py:187:44: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/middleware/test_base.py:277:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/middleware/test_base.py:315:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/middleware/test_base.py:335:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/middleware/test_base.py:362:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/middleware/test_base.py:433:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/middleware/test_base.py:434:24: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ContextManagerMiddleware'>`
- tests/middleware/test_base.py:609:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:638:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:667:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:693:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:725:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:754:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:843:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:871:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- tests/middleware/test_base.py:1086:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'MyMiddleware'>`
- tests/middleware/test_base.py:1220:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/middleware/test_base.py:1278:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'PassthroughMiddleware'>`
- tests/middleware/test_cors.py:20:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:81:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:132:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:181:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:222:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:255:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:285:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:310:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:382:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:413:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:431:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:446:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:465:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:480:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:503:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_cors.py:543:17: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CORSMiddleware'>`
- tests/middleware/test_gzip.py:23:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:41:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:61:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:84:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:107:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:132:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:155:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_gzip.py:180:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'GZipMiddleware'>`
- tests/middleware/test_https_redirect.py:16:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'HTTPSRedirectMiddleware'>`
- tests/middleware/test_middleware.py:16:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/middleware/test_middleware.py:21:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/middleware/test_session.py:35:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:67:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:92:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:127:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:146:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:165:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:187:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_trusted_host.py:16:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'TrustedHostMiddleware'>`
- tests/middleware/test_trusted_host.py:44:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'TrustedHostMiddleware'>`
- tests/test_applications.py:137:26: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'TrustedHostMiddleware'>`
- tests/test_applications.py:485:28: error[invalid-argument-type] Argument to bound method `add_middleware` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SimpleInitializableMiddleware'>`
- tests/test_applications.py:486:28: error[invalid-argument-type] Argument to bound method `add_middleware` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'NoOpMiddleware'>`
- tests/test_applications.py:520:24: error[invalid-argument-type] Argument to bound method `add_middleware` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'MiddlewareWithArgs'>`
- tests/test_applications.py:521:24: error[invalid-argument-type] Argument to bound method `add_middleware` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'MiddlewareWithArgs'>`
- tests/test_applications.py:543:24: error[invalid-argument-type] Argument to bound method `add_middleware` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `def _middleware_factory(app: (MutableMapping[str, Any], () -> Awaitable[MutableMapping[str, Any]], (MutableMapping[str, Any], /) -> Awaitable[None], /) -> Awaitable[None], arg: str) -> ((MutableMapping[str, Any], () -> Awaitable[MutableMapping[str, Any]], (MutableMapping[str, Any], /) -> Awaitable[None], /) -> Awaitable[None])`
- tests/test_applications.py:544:24: error[invalid-argument-type] Argument to bound method `add_middleware` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `((MutableMapping[str, Any], () -> Awaitable[MutableMapping[str, Any]], (MutableMapping[str, Any], /) -> Awaitable[None], /) -> Awaitable[None], str, /) -> ((MutableMapping[str, Any], () -> Awaitable[MutableMapping[str, Any]], (MutableMapping[str, Any], /) -> Awaitable[None], /) -> Awaitable[None])`
- tests/test_authentication.py:188:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'AuthenticationMiddleware'>`
- tests/test_authentication.py:343:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'AuthenticationMiddleware'>`
- tests/test_requests.py:667:79: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/test_routing.py:328:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/test_routing.py:825:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'AddHeadersMiddleware'>`
- tests/test_routing.py:843:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'AddHeadersMiddleware'>`
- tests/test_routing.py:860:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'AddHeadersMiddleware'>`
- tests/test_routing.py:964:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'NamedMiddleware'>`
- tests/test_routing.py:969:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'NamedMiddleware'>`
- tests/test_routing.py:1016:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'WebsocketMiddleware'>`
- tests/test_staticfiles.py:59:30: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BaseHTTPMiddleware'>`
- tests/test_templates.py:80:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- tests/test_testclient.py:190:58: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'BrokenMiddleware'>`
- Found 191 diagnostics
+ Found 110 diagnostics

rich (https://github.com/Textualize/rich)
- tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
- tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
- tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
- tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`

PyGithub (https://github.com/PyGithub/PyGithub)
- github/Requester.py:899:57: error[invalid-argument-type] Argument to bound method `__hostnameHasDomain` is incorrect: Expected `str | list[str]`, found `Unknown | list[Unknown | str] | list[None | Unknown | str]`
+ github/Requester.py:899:57: error[invalid-argument-type] Argument to bound method `__hostnameHasDomain` is incorrect: Expected `str | list[str]`, found `Unknown | list[Unknown | str] | list[str | Unknown | None]`

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/specs/graphql/schemas.py:247:16: error[missing-argument] No argument provided for required parameter `*args`
- src/schemathesis/specs/openapi/_hypothesis.py:549:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/_hypothesis.py:797:45: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:118:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:162:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:190:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:226:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:579:16: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:1069:16: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/examples.py:96:9: error[missing-argument] No argument provided for required parameter `*args`
- src/schemathesis/specs/openapi/negative/__init__.py:199:24: error[missing-argument] No argument provided for required parameter `*args`
- src/schemathesis/specs/openapi/negative/__init__.py:221:16: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/schemas.py:533:16: error[missing-argument] No argument provided for required parameter `*args`
- src/schemathesis/specs/openapi/stateful/__init__.py:200:37: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/stateful/__init__.py:342:16: error[missing-argument] No argument provided for required parameter `*args`
- Found 318 diagnostics
+ Found 303 diagnostics

pandera (https://github.com/pandera-dev/pandera)
+ tests/pandas/test_schema_components.py:44:9: error[no-matching-overload] No overload of bound method `pipe` matches arguments
- Found 1633 diagnostics
+ Found 1634 diagnostics

Expression (https://github.com/cognitedata/Expression)
+ expression/collections/array.py:475:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_TSource, _TResult](source: TypedArray[_TSource], mapper: (_TSource, /) -> _TResult) -> TypedArray[_TResult]`
+ expression/collections/array.py:496:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def filter[_TSource](source: TypedArray[_TSource], predicate: (_TSource, /) -> bool) -> TypedArray[_TSource]`
+ expression/collections/array.py:513:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def fold[_TSource, _TState](source: TypedArray[_TSource], folder: (_TState, _TSource, /) -> _TState, state: _TState) -> _TState`
+ expression/collections/array.py:587:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> int`, found `def sum_by[_TSource, _TSourceSum](source: TypedArray[_TSource], projection: (_TSource, /) -> _TSourceSum) -> int`
+ expression/collections/array.py:592:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def take[_TSource](source: TypedArray[_TSource], count: int) -> TypedArray[_TSource]`
+ expression/collections/array.py:606:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def take_last[_TSource](source: TypedArray[_TSource], count: int) -> TypedArray[_TSource]`
+ expression/collections/array.py:637:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def unfold[_TState, _TSource](state: _TState, generator: (_TState, /) -> Option[tuple[_TSource, _TState]]) -> TypedArray[_TSource]`
+ expression/collections/block.py:560:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def append[_TSource](source: Block[_TSource], other: Block[_TSource]) -> Block[_TSource]`
+ expression/collections/block.py:565:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def choose[_TSource, _TResult](source: Block[_TSource], chooser: (_TSource, /) -> Option[_TResult]) -> Block[_TResult]`
+ expression/collections/block.py:570:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def collect[_TSource, _TResult](source: Block[_TSource], mapping: (_TSource, /) -> Block[_TResult]) -> Block[_TResult]`
+ expression/collections/block.py:607:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def filter[_TSource](source: Block[_TSource], predicate: (_TSource, /) -> bool) -> Block[_TSource]`
+ expression/collections/block.py:624:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def fold[_TSource, _TState](source: Block[_TSource], folder: (_TState, _TSource, /) -> _TState, state: _TState) -> _TState`
+ expression/collections/block.py:654:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> bool`, found `def forall[_TSource](source: Block[_TSource], predicate: (_TSource, /) -> bool) -> bool`
+ expression/collections/block.py:718:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_TSource, _TResult](source: Block[_TSource], mapper: (_TSource, /) -> _TResult) -> Block[_TResult]`
+ expression/collections/block.py:735:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def reduce[_TSource](source: Block[_TSource], reduction: (_TSource, _TSource, /) -> _TSource) -> _TSource`
+ expression/collections/block.py:792:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def mapi[_TSource, _TResult](source: Block[_TSource], mapper: (int, _TSource, /) -> _TResult) -> Block[_TResult]`
+ expression/collections/block.py:830:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def partition[_TSource](source: Block[_TSource], predicate: (_TSource, /) -> bool) -> tuple[Block[_TSource], Block[_TSource]]`
+ expression/collections/block.py:873:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def skip[_TSource](source: Block[_TSource], count: int) -> Block[_TSource]`
+ expression/collections/block.py:887:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def skip_last[_TSource](source: Block[_TSource], count: int) -> Block[_TSource]`
+ expression/collections/block.py:901:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, reverse: bool = False) -> Never`, found `def sort[_TSourceSortable](source: Block[_TSourceSortable], reverse: bool = False) -> Block[_TSourceSortable]`
+ expression/collections/block.py:918:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def sort_with[_TSource](source: Block[_TSource], func: (_TSource, /) -> Any, reverse: bool = False) -> Block[_TSource]`
+ expression/collections/block.py:937:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def sum_by[_TSourceSum, _TResult](source: Block[_TSourceSum], projection: (_TSourceSum, /) -> _TResult) -> _TResult`
+ expression/collections/block.py:947:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def take[_TSource](source: Block[_TSource], count: int) -> Block[_TSource]`
+ expression/collections/block.py:961:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def take_last[_TSource](source: Block[_TSource], count: int) -> Block[_TSource]`
+ expression/collections/block.py:996:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def unfold[_TState, _TSource](state: _TState, generator: (_TState, /) -> Option[tuple[_TSource, _TState]]) -> Block[_TSource]`
+ expression/collections/block.py:1017:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def zip[_TSource, _TResult](source: Block[_TSource], other: Block[_TResult]) -> Block[tuple[_TSource, _TResult]]`
+ expression/collections/map.py:258:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def add[_Key, _Value](table: Map[_Key, _Value], key: _Key, value: _Value) -> Map[_Key, _Value]`
+ expression/collections/map.py:279:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def change[_Key, _Value](table: Map[_Key, _Value], key: _Key, fn: (Option[_Value], /) -> Option[_Value]) -> Map[_Key, _Value]`
+ expression/collections/map.py:297:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> bool`, found `def contains_key[_Key](table: Map[_Key, Any], key: _Key) -> bool`
+ expression/collections/map.py:311:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def find[_Key, _Value](table: Map[_Key, _Value], key: _Key) -> _Value`
+ expression/collections/map.py:345:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def try_pick[_Key, _Value, _Result](table: Map[_Key, _Value], chooser: (_Key, _Value, /) -> Option[_Result]) -> Option[_Result]`
+ expression/collections/map.py:364:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def pick[_Key, _Value, _Result](table: Map[_Key, _Value], chooser: (_Key, _Value, /) -> Option[_Result]) -> _Result`
+ expression/collections/map.py:372:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> bool`, found `def exists[_Key, _Value](table: Map[_Key, _Value], predicate: (_Key, _Value, /) -> bool) -> bool`
+ expression/collections/map.py:391:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def filter[_Key, _Value](table: Map[_Key, _Value], predicate: (_Key, _Value, /) -> bool) -> Map[_Key, _Value]`
+ expression/collections/map.py:396:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> bool`, found `def for_all[_Key, _Value](table: Map[_Key, _Value], predicate: (_Key, _Value, /) -> bool) -> bool`
+ expression/collections/map.py:401:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_Key, _Value, _Result](table: Map[_Key, _Value], mapping: (_Key, _Value, /) -> _Result) -> Map[_Key, _Result]`
+ expression/collections/map.py:406:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def fold[_Key, _Value, _Result](table: Map[_Key, _Value], folder: (_Result, tuple[_Key, _Value], /) -> _Result, state: _Result) -> _Result`
+ expression/collections/map.py:415:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def fold_back[_Result, _Key, _Value](state: _Result, folder: (tuple[_Key, _Value], _Result, /) -> _Result, table: Map[_Key, _Value]) -> _Result`
+ expression/collections/map.py:424:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def partition[_Key, _Value](table: Map[_Key, _Value], predicate: (_Key, _Value, /) -> bool) -> tuple[Map[_Key, _Value], Map[_Key, _Value]]`
+ expression/collections/map.py:431:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def remove[_Key, _Value](table: Map[_Key, _Value], key: _Key) -> Map[_Key, _Value]`
+ expression/collections/map.py:473:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def try_find[_Key, _Value](table: Map[_Key, _Value], key: _Key) -> Option[_Value]`
+ expression/collections/seq.py:93:38: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Self@filter`
+ expression/collections/seq.py:287:31: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Self@skip, /) -> Unknown`, found `(Never, /) -> Never`
+ expression/collections/seq.py:316:31: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Self@take, /) -> Unknown`, found `(Never, /) -> Never`
+ expression/collections/seq.py:426:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def choose[_TSource, _TResult](source: Iterable[_TSource], chooser: (_TSource, /) -> Option[_TResult]) -> Iterable[_TResult]`
+ expression/collections/seq.py:449:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def collect[_TSource, _TResult](source: Iterable[_TSource], mapping: (_TSource, /) -> Iterable[_TResult]) -> Iterable[_TResult]`
+ expression/collections/seq.py:515:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def filter[_TSource](source: Iterable[_TSource], predicate: (_TSource, /) -> bool) -> Iterable[_TSource]`
+ expression/collections/seq.py:534:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def fold[_TSource, _TState](source: Iterable[_TSource], folder: (_TState, _TSource, /) -> _TState, state: _TState) -> _TState`
+ expression/collections/seq.py:641:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> None`, found `def iter[_TSource](source: Iterable[_TSource], action: (_TSource, /) -> None) -> None`
+ expression/collections/seq.py:661:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_TSource, _TResult](source: Iterable[_TSource], mapper: (_TSource, /) -> _TResult) -> Iterable[_TResult]`
+ expression/collections/seq.py:728:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def mapi[_TSource, _TResult](source: Iterable[_TSource], mapping: (int, _TSource, /) -> _TResult) -> Iterable[_TResult]`
+ expression/collections/seq.py:758:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def max_by[_TSource, _TSupportsGreaterThan](source: Iterable[_TSource], projection: (_TSource, /) -> _TSupportsGreaterThan) -> _TSupportsGreaterThan`
+ expression/collections/seq.py:774:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def min_by[_TSource, _TSupportsLessThan](source: Iterable[_TSource], projection: (_TSource, /) -> _TSupportsLessThan) -> _TSupportsLessThan`
+ expression/collections/seq.py:815:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def scan[_TSource, _TState](source: Iterable[_TSource], scanner: (_TState, _TSource, /) -> _TState, state: _TState) -> Iterable[_TState]`
+ expression/collections/seq.py:846:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def skip[_TSource](source: Iterable[_TSource], count: int) -> Iterable[_TSource]`
+ expression/collections/seq.py:872:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def sum_by[_TSource, _TSupportsSum](source: Iterable[_TSource], projection: (_TSource, /) -> _TSupportsSum) -> _TSupportsSum`
+ expression/collections/seq.py:892:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, count: int) -> Never`, found `def take[_TSource](source: Iterable[_TSource], count: int) -> Iterable[_TSource]`
+ expression/collections/seq.py:922:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def unfold[_TState, _TSource](state: _TState, generator: (_TState, /) -> Option[tuple[_TSource, _TState]]) -> Iterable[_TSource]`
+ expression/core/option.py:386:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def bind[_TSource, _TResult](option: Option[_TSource], mapper: (_TSource, /) -> Option[_TResult]) -> Option[_TResult]`
+ expression/core/option.py:406:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def default_value[_TSource, _T1](option: Option[_TSource], value: _T1) -> _TSource | _T1`
+ expression/core/option.py:437:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_TSource, _TResult](option: Option[_TSource], mapper: (_TSource, /) -> _TResult) -> Option[_TResult]`
+ expression/core/option.py:442:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map2[_T1, _T2, _TResult](opt1: Option[_T1], opt2: Option[_T2], mapper: (_T1, _T2, /) -> _TResult) -> Option[_TResult]`
+ expression/core/option.py:447:1: error[invalid-argument-type] Argument is incorrect: Expected `(Option[tuple[@Todo(TypeVarTuple), ...]], /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def starmap[_TResult](option: Option[tuple[@Todo(TypeVarTuple), ...]], mapper: (...) -> _TResult) -> Option[_TResult]`
+ expression/core/result.py:391:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_TSource, _TError, _TResult](result: Result[_TSource, _TError], mapper: (_TSource, /) -> _TResult) -> Result[_TResult, _TError]`
+ expression/core/result.py:396:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map2[_TSource, _TError, _TOther, _TResult](x: Result[_TSource, _TError], y: Result[_TOther, _TError], mapper: (_TSource, _TOther, /) -> _TResult) -> Result[_TResult, _TError]`
+ expression/core/result.py:405:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map_error[_TSource, _TError, _TResult](result: Result[_TSource, _TError], mapper: (_TError, /) -> _TResult) -> Result[_TSource, _TResult]`
+ expression/core/result.py:410:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def bind[_TSource, _TError, _TResult](result: Result[_TSource, _TError], mapper: (_TSource, /) -> Result[_TResult, Any]) -> Result[_TResult, _TError]`
+ expression/core/result.py:432:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def filter[_TSource, _TError](result: Result[_TSource, _TError], predicate: (_TSource, /) -> bool, default: _TError) -> Result[_TSource, _TError]`
+ expression/core/result.py:441:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def filter_with[_TSource, _TError](result: Result[_TSource, _TError], predicate: (_TSource, /) -> bool, default: (_TSource, /) -> _TError) -> Result[_TSource, _TError]`
+ expression/core/result.py:455:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def or_else[_TSource, _TError](result: Result[_TSource, _TError], other: Result[_TSource, _TError]) -> Result[_TSource, _TError]`
+ expression/core/result.py:460:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def or_else_with[_TSource, _TError](result: Result[_TSource, _TError], other: (_TError, /) -> Result[_TSource, _TError]) -> Result[_TSource, _TError]`
+ expression/extra/parser.py:54:39: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[_B@ignore_then]`
+ expression/extra/parser.py:57:39: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[Any]`
+ expression/extra/parser.py:60:24: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Self@or_else`
+ expression/extra/parser.py:86:24: error[invalid-argument-type] Argument is incorrect: Expected `(_A'return@curry & Parser[Any]) | (_B'return@curry & Parser[Any])`, found `Parser[_A@Parser]`
+ expression/extra/parser.py:86:28: error[invalid-argument-type] Argument is incorrect: Expected `(_A'return@curry & Parser[Any]) | (_B'return@curry & Parser[Any])`, found `Parser[Any]`
+ expression/extra/parser.py:113:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def and_then[_B, _A](p2: Parser[_B], p1: Parser[_A]) -> Parser[tuple[_A, _B]]`
+ expression/extra/parser.py:145:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def or_else[_A](p1: Parser[_A], p2: Parser[_A]) -> Parser[_A]`
+ expression/extra/parser.py:177:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def map[_A, _B](mapper: (_A, /) -> _B, parser: Parser[_A]) -> Parser[_B]`
+ expression/extra/parser.py:197:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def starmap[_A, _B, _C](mapper: (_A, _B, /) -> _C, parser: Parser[tuple[_A, _B]]) -> Parser[_C]`
+ expression/extra/parser.py:202:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def starmap[_A, _B, _C, _D](mapper: (_A, _B, _C, /) -> _D, parser: Parser[tuple[_A, _B, _C]]) -> Parser[_D]`
+ expression/extra/parser.py:245:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def lift2[_A, _B, _C](fn: (_A, /) -> ((_B, /) -> _C), xP: Parser[_A], yP: Parser[_B]) -> Parser[_C]`
+ expression/extra/parser.py:353:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, *args: Unknown, **kwargs: Unknown) -> Never`, found `def then_ignore[_A](p2: Parser[Any], p1: Parser[_A]) -> Parser[_A]`
+ expression/extra/parser.py:381:1: error[invalid-argument-type] Argument is incorrect: Expected `(Never, /, p1: Parser[Any]) -> Never`, found `def ignore_then[_B](p2: Parser[_B], p1: Parser[Any]) -> Parser[_B]`
+ expression/extra/parser.py:457:33: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[Block[str]]`
+ expression/extra/parser.py:473:1: error[invalid-argument-type] Argument is incorrect: Expected `((_A'return@curry & Parser[Any]) | (_B'return@curry & Parser[Any]), (_A'return@curry & Parser[Any]) | (_B'return@curry & Parser[Any]), /, *args: Unknown, **kwargs: Unknown) -> (_A'return@curry & Parser[Any]) | (_B'return@curry & Parser[Any])`, found `def between[_A](popen: Parser[Any], pclose: Parser[Any], p: Parser[_A]) -> Parser[_A]`
+ expression/extra/parser.py:490:21: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[_A@between]`
+ expression/extra/parser.py:491:21: error[invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[Any]`
+ expression/extra/parser.py:503:1: error[invalid-argument-type] Argument is incorrect: Expected `(Unknown, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def bind[_A, _B](f: (_A, /) -> Parser[_B], p: Parser[_A]) -> Parser[_B]`
+ tests/test_array.py:333:23: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(TypedArray[int], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_block.py:300:23: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Block[int], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_block.py:309:23: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Block[int], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_block.py:321:9: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Block[str], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_map.py:74:21: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Map[str, int] | Unknown, /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_result.py:296:24: error[invalid-argument-type] Argument to bound method `pipe` is incorrect: Expected `(Result[Literal[42], Any], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_result.py:320:24: error[invalid-argument-type] Argument to bound method `pipe` is incorrect: Expected `(Result[Literal[42], Any], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_result.py:513:24: error[invalid-argument-type] Argument to bound method `pipe` is incorrect: Expected `(Result[Literal[42], Any], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_result.py:540:24: error[invalid-argument-type] Argument to bound method `pipe` is incorrect: Expected `(Result[Literal[42], Any], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_seq.py:229:23: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Seq[int], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_seq.py:239:23: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Seq[int], /) -> Unknown`, found `(Never, /) -> Never`
+ tests/test_seq.py:248:19: error[invalid-argument-type] Argument to function `pipe` is incorrect: Expected `(Iterable[int], /) -> Unknown`, found `(Never, /) -> Never`
- Found 205 diagnostics
+ Found 306 diagnostics

artigraph (https://github.com/artigraph/artigraph)
- tests/arti/types/test_types.py:100:51: error[invalid-argument-type] Argument is incorrect: Expected `frozenset[Any]`, found `frozenset[float | Unknown | int] | list[int | Unknown | float] | tuple[float | Unknown | int, ...]`
+ tests/arti/types/test_types.py:100:51: error[invalid-argument-type] Argument is incorrect: Expected `frozenset[Any]`, found `frozenset[float | Unknown | int] | list[Unknown | int | float] | tuple[float | Unknown | int, ...]`

discord.py (https://github.com/Rapptz/discord.py)
- discord/app_commands/commands.py:149:92: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
+ discord/app_commands/commands.py:683:28: error[unresolved-attribute] Object of type `((GroupT@Command, Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__self__`
+ discord/app_commands/commands.py:684:41: error[unresolved-attribute] Object of type `((GroupT@Command, Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__func__`
+ discord/app_commands/commands.py:684:41: error[unresolved-attribute] Object of type `((GroupT@Command, Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__func__`
+ discord/app_commands/commands.py:688:97: error[unresolved-attribute] Attribute `__globals__` is not defined on `(GroupT@Command, Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]`, `(Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]` in union `((GroupT@Command, Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Interaction[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | Unknown`
- discord/app_commands/commands.py:657:43: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:675:49: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:683:28: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__self__`
- discord/app_commands/commands.py:684:41: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__func__`
- discord/app_commands/commands.py:684:41: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__func__`
- discord/app_commands/commands.py:688:97: error[unresolved-attribute] Attribute `__globals__` is not defined on `(...) -> Coroutine[Any, Any, Unknown]` in union `((...) -> Coroutine[Any, Any, Unknown]) | Unknown`
- discord/app_commands/commands.py:726:51: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:858:83: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/app_commands/commands.py:859:65: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ discord/app_commands/commands.py:2005:55: error[unresolved-attribute] Object of type `((GroupT@decorator, Interaction[Any], /, *args: P@decorator.args, **kwargs: P@decorator.kwargs) -> Coroutine[Any, Any, T@decorator]) | ((Interaction[Any], /, *args: P@decorator.args, **kwargs: P@decorator.kwargs) -> Coroutine[Any, Any, T@decorator])` has no attribute `__name__`
+ discord/app_commands/commands.py:2066:51: error[unresolved-attribute] Object of type `((GroupT@decorator, Interaction[Any], /, *args: P@decorator.args, **kwargs: P@decorator.kwargs) -> Coroutine[Any, Any, T@decorator]) | ((Interaction[Any], /, *args: P@decorator.args, **kwargs: P@decorator.kwargs) -> Coroutine[Any, Any, T@decorator])` has no attribute `__name__`
- discord/app_commands/commands.py:1967:44: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:1992:53: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:2005:55: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__name__`
- discord/app_commands/commands.py:2026:40: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:2053:49: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/commands.py:2066:51: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__name__`
+ discord/app_commands/tree.py:923:55: error[unresolved-attribute] Object of type `((Group, Interaction[Any], /, *args: P@decorator.args, **kwargs: P@decorator.kwargs) -> Coroutine[Any, Any, T@decorator]) | ((Interaction[Any], /, *args: P@decorator.args, **kwargs: P@decorator.kwargs) -> Coroutine[Any, Any, T@decorator])` has no attribute `__name__`
- discord/app_commands/tree.py:862:43: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/tree.py:910:52: error[invalid-type-arguments] Too many type arguments: expected 1, got 3
- discord/app_commands/tree.py:923:55: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__name__`
- discord/ext/commands/bot.py:296:41: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/bot.py:306:50: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/bot.py:320:41: error[invalid-type-argumen

... (truncated 745 lines) ...

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 6, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 219 114 8
missing-argument 49 31 0
unresolved-attribute 5 1 65
invalid-return-type 47 2 6
no-matching-overload 24 10 0
invalid-context-manager 0 0 32
type-assertion-failure 3 18 11
invalid-type-arguments 0 24 0
invalid-assignment 3 8 9
unused-type-ignore-comment 0 17 0
too-many-positional-arguments 4 0 0
unused-ignore-comment 1 0 0
Total 355 225 131

Full report with detailed diff (timing results)

@choucavalier choucavalier marked this pull request as draft February 6, 2026 12:51
@choucavalier choucavalier force-pushed the main branch 2 times, most recently from 2e6c807 to f1e5800 Compare February 6, 2026 12:56
@choucavalier choucavalier marked this pull request as ready for review February 6, 2026 12:58
@choucavalier
Copy link
Author

@sharkdp can you re-run the workflows please 🙏

@AlexWaygood
Copy link
Member

AlexWaygood commented Feb 6, 2026

The two new false positives being added on the typing conformance suite look related to astral-sh/ty#1257. And on net this now improves our conformance score, which is great!

@choucavalier
Copy link
Author

@AlexWaygood just rebased on main. I guess solving the false positives is a wider problem that deserves its own PR, don't you think?

@dhruvmanila dhruvmanila self-assigned this Feb 10, 2026
@AlexWaygood AlexWaygood removed their request for review February 10, 2026 19:37
@choucavalier
Copy link
Author

@dhruvmanila thanks for reviewing ❤️ let me know if you need some changes

@Hugo-Polloli
Copy link
Contributor

Hi! I'm not a maintainer, so take this with a grain of salt, but I independently explored Concatenate support before finding your PR.

The main difference in my approach was adding an enum variant on ParametersKind specifically for Concatenate, which makes plumbing more explicit, rather than relying on shape-based heuristics. Might be worth considering, wdyt?

I also ran into the same regression you did, tried working around but it felt VERY monkey-patchy to me. More complete Concatenate support will eventually make it go away entirely.
Good work overall!

@choucavalier
Copy link
Author

@Hugo-Polloli done, can you review?
@AlexWaygood / @dhruvmanila can you re-run the workflows?

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 16, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 692.44MB 692.48MB +0.01% (46.15kB)
sphinx 272.07MB 272.07MB +0.00% (6.88kB)
trio 119.32MB 119.33MB +0.01% (6.53kB)
flake8 49.45MB 49.45MB -

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
CallableType 1.89MB 1.91MB +0.70% (13.57kB)
for_constraint_pair_inner 412.07kB 420.50kB +2.05% (8.44kB)
Type<'db>::apply_specialization_ 3.76MB 3.77MB +0.20% (7.53kB)
for_constraint_inner 221.88kB 225.41kB +1.59% (3.53kB)
InteriorNode 198.96kB 201.50kB +1.28% (2.54kB)
for_constraint_pair_inner::interned_arguments 98.02kB 100.55kB +2.58% (2.53kB)
infer_definition_types 85.68MB 85.69MB +0.00% (2.40kB)
solutions_inner 195.70kB 197.94kB +1.15% (2.25kB)
GenericContext 299.82kB 297.58kB -0.75% (2.24kB)
ConstrainedTypeVar 116.72kB 118.41kB +1.45% (1.69kB)
TupleType 682.14kB 680.91kB -0.18% (1.23kB)
FunctionType<'db>::last_definition_raw_signature_ 3.13MB 3.13MB -0.03% (1.09kB)
TypeVarInstance 388.59kB 387.56kB -0.27% (1.03kB)
infer_scope_types_impl 53.16MB 53.16MB +0.00% (876.00B)
Type<'db>::class_member_with_policy_ 16.39MB 16.39MB +0.00% (728.00B)
... 30 more

sphinx

Name Old New Diff Outcome
CallableType 1.13MB 1.13MB +0.18% (2.04kB)
FunctionType 3.16MB 3.16MB +0.03% (880.00B)
Type<'db>::apply_specialization_ 1.75MB 1.75MB +0.04% (660.00B)
FunctionType<'db>::signature_ 2.30MB 2.30MB +0.02% (544.00B)
infer_deferred_types 5.61MB 5.61MB +0.01% (456.00B)
infer_expression_type_impl 3.41MB 3.41MB -0.01% (412.00B)
for_constraint_pair_inner 186.14kB 186.53kB +0.21% (396.00B)
Specialization 1.05MB 1.05MB +0.03% (304.00B)
GenericContext 145.77kB 146.04kB +0.19% (280.00B)
FunctionType<'db>::last_definition_signature_ 226.55kB 226.80kB +0.11% (256.00B)
Type<'db>::apply_specialization_::interned_arguments 1.49MB 1.49MB +0.02% (240.00B)
inferable_typevars_inner 81.48kB 81.68kB +0.25% (212.00B)
InteriorNode 88.05kB 88.26kB +0.23% (208.00B)
IntersectionType 1.03MB 1.03MB +0.02% (200.00B)
infer_expression_types_impl 22.04MB 22.04MB -0.00% (172.00B)
... 17 more

trio

Name Old New Diff Outcome
for_constraint_pair_inner 60.68kB 61.77kB +1.80% (1.09kB)
CallableType 597.86kB 598.91kB +0.18% (1.05kB)
infer_expression_types_impl 6.07MB 6.07MB +0.01% (744.00B)
FunctionType 1.51MB 1.51MB +0.03% (512.00B)
infer_deferred_types 2.36MB 2.36MB +0.02% (456.00B)
for_constraint_pair_inner::interned_arguments 17.02kB 17.44kB +2.48% (432.00B)
InteriorNode 43.98kB 44.38kB +0.92% (416.00B)
for_constraint_inner 60.73kB 61.08kB +0.58% (360.00B)
FunctionType<'db>::signature_ 1.07MB 1.07MB +0.03% (344.00B)
Type<'db>::apply_specialization_ 772.17kB 772.43kB +0.03% (268.00B)
solutions_inner 39.04kB 39.25kB +0.54% (216.00B)
ConstrainedTypeVar 31.12kB 31.31kB +0.60% (192.00B)
InteriorNode<'db>::and_::interned_arguments 7.27kB 7.42kB +2.15% (160.00B)
Specialization 486.95kB 487.09kB +0.03% (144.00B)
InteriorNode<'db>::and_ 6.39kB 6.52kB +2.08% (136.00B)
... 4 more

@dhruvmanila
Copy link
Member

(Apologies for the delay, planning to review this tomorrow.)

@choucavalier
Copy link
Author

no worries @dhruvmanila thanks for taking the time!

@choucavalier
Copy link
Author

@dhruvmanila i just resolved the conflicts with main. can you re-run the workflows?

@dhruvmanila
Copy link
Member

It seems like I can't push to this branch, I'm going to re-create this PR to continue making progress on this feature.

@dhruvmanila
Copy link
Member

Closing this in favor of #23689

@dhruvmanila dhruvmanila closed this Mar 3, 2026
dhruvmanila added a commit that referenced this pull request Mar 3, 2026
## Summary

This PR adds a comprehensive test suite for `typing.Concatenate` in
preparation for astral-sh/ty#1535 and to help
the review process in #23119.

## Test Plan

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

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants