Skip to content

[ty] Add support for typing.Concatenate#23689

Open
dhruvmanila wants to merge 11 commits intomainfrom
dhruv/typing-concatenate
Open

[ty] Add support for typing.Concatenate#23689
dhruvmanila wants to merge 11 commits intomainfrom
dhruv/typing-concatenate

Conversation

@dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Mar 3, 2026

Summary

closes: astral-sh/ty#1535
closes: astral-sh/ty#1635
closes: astral-sh/ty#2024

This PR adds support for typing.Concatenate.

The way it implements is by expanding the existing ParametersKind to include a new enum ParametersKind::Concatenate which contains a ConcatenateTail enum which represents the two form specifically the Concatenate[<prefix params>, ...] (gradual form) and Concatenate[<prefix params>, P] (where P is a ParamSpec type variable). Internally, it still adds the *args and **kwargs to the parameter list.

closes: astral-sh/ty#1257

Additionally, it also updates the Parameters::new method to consider other gradual forms, specifically to support the following from the typing spec:

If the input signature in a function definition includes both a *args and **kwargs parameter and both are typed as Any (explicitly or implicitly because it has no annotation), a type checker should treat this as the equivalent of .... Any other parameters in the signature are unaffected and are retained as part of the signature.

https://typing.python.org/en/latest/spec/callables.html#meaning-of-in-callable

A function declared as def inner(a: A, b: B, *args: P.args, **kwargs: P.kwargs) -> R has type Callable[Concatenate[A, B, P], R]. Placing keyword-only parameters between the *args and **kwargs is forbidden.

https://typing.python.org/en/latest/spec/generics.html#id5

Assignability

The main complexity rises in checking the relation between two signatures. Currently, the logic implemented in this PR is a little bit duplicated from existing check in the parameter loop but is a more limited version given the constraints the the prefix parameters have for concatenate (can be positional-only).

I plan to simplify this as a follow-up instead because otherwise the diff would be quite complicated.

Test Plan

Update existing test cases containing TODOs, add new test cases.

Go through the ecosystem analysis with the help of an agent, add regression test cases for some of the common cases.

@dhruvmanila dhruvmanila added the ty Multi-file analysis & type inference label Mar 3, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 3, 2026

Typing conformance results improved 🎉

The percentage of diagnostics emitted that were expected errors increased from 85.29% to 85.92%. The percentage of expected errors that received a diagnostic increased from 78.13% to 79.36%. The number of fully passing files improved from 64/132 to 65/132.

Summary

How are test cases classified?

Each test case represents one expected error annotation or a group of annotations sharing a tag. Counts are per test case, not per diagnostic — multiple diagnostics on the same line count as one. Required annotations (E) are true positives when ty flags the expected location and false negatives when it does not. Optional annotations (E?) are true positives when flagged but true negatives (not false negatives) when not. Tagged annotations (E[tag]) require ty to flag exactly one of the tagged lines; tagged multi-annotations (E[tag+]) allow any number up to the tag count. Flagging unexpected locations counts as a false positive.

Metric Old New Diff Outcome
True Positives 829 842 +13 ⏫ (✅)
False Positives 143 138 -5 ⏬ (✅)
False Negatives 232 219 -13 ⏬ (✅)
Total Diagnostics 1049 1058 +9
Precision 85.29% 85.92% +0.63% ⏫ (✅)
Recall 78.13% 79.36% +1.23% ⏫ (✅)
Passing Files 64/132 65/132 +1 ⏫ (✅)

Test file breakdown

6 files altered
File True Positives False Positives False Negatives Status
generics_paramspec_semantics.py 10 (+5) ✅ 0 (-2) ✅ 0 (-5) ✅ ✅ Newly Passing 🎉
callables_annotation.py 15 (+5) ✅ 0 (-1) ✅ 1 (-5) ✅ 📈 Improving
generics_paramspec_components.py 15 (+2) ✅ 0 1 (-2) ✅ 📈 Improving
generics_paramspec_basic.py 6 (+1) ✅ 0 1 (-1) ✅ 📈 Improving
aliases_explicit.py 19 0 (-1) ✅ 2 📈 Improving
aliases_implicit.py 17 0 (-1) ✅ 5 📈 Improving
Total (all files) 842 (+13) ✅ 138 (-5) ✅ 219 (-13) ✅ 65/132

True positives added (13)

13 diagnostics
Test case Diff

callables_annotation.py:172

+error[invalid-assignment] Object of type `() -> str` is not assignable to `(int, /, *args: Any, **kwargs: Any) -> str`

callables_annotation.py:187

+error[invalid-assignment] Object of type `(int, str, /) -> str` is not assignable to `(str, /, *args: Any, **kwargs: Any) -> str`

callables_annotation.py:189

+error[invalid-assignment] Object of type `(int, str, /) -> str` is not assignable to `(str, /, *args: Any, **kwargs: Any) -> str`

callables_annotation.py:91

+error[invalid-assignment] Object of type `def test_cb2() -> str` is not assignable to `(int, /, *args: Any, **kwargs: Any) -> str`

callables_annotation.py:93

+error[invalid-assignment] Object of type `def test_cb4(*, a: int) -> str` is not assignable to `(int, /, *args: Any, **kwargs: Any) -> str`

generics_paramspec_basic.py:27

+error[invalid-type-form] `typing.Concatenate` is not allowed in this context in a type expression

generics_paramspec_components.py:70

+error[invalid-argument-type] Argument is incorrect: Expected `int`, found `P@remove.args`
+error[invalid-argument-type] Argument is incorrect: Expected `P@remove.args`, found `Literal[1]`

generics_paramspec_components.py:72

+error[invalid-argument-type] Argument is incorrect: Expected `int`, found `P@remove.args`

generics_paramspec_semantics.py:120

+error[invalid-argument-type] Argument is incorrect: Expected `str`, found `Literal[1]`

generics_paramspec_semantics.py:127

+error[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

+error[invalid-argument-type] Argument to function `expects_int_first` is incorrect: Expected `(int, /, *args: Unknown, **kwargs: Unknown) -> int`, found `def two(*, x: int) -> int`

generics_paramspec_semantics.py:137

+error[invalid-argument-type] Argument to function `expects_int_first` is incorrect: Expected `(int, /, *args: Unknown, **kwargs: Unknown) -> int`, found `def three(**kwargs: int) -> int`

generics_paramspec_semantics.py:98

+error[invalid-argument-type] Argument is incorrect: Expected `str`, found `Literal[1]`

False positives removed (5)

5 diagnostics
Test case Diff

aliases_explicit.py:57

-error[type-assertion-failure] Type `Unknown` does not match asserted type `(int, str, str, /) -> None`

aliases_implicit.py:68

-error[type-assertion-failure] Type `Unknown` does not match asserted type `(int, str, str, /) -> None`

callables_annotation.py:157

-error[invalid-assignment] Object of type `Proto7` is not assignable to `Proto6`

generics_paramspec_semantics.py:106

-error[missing-argument] No argument provided for required parameter `**kwargs`

generics_paramspec_semantics.py:107

-error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`

True positives changed (1)

1 diagnostic
Test case Diff

generics_paramspec_semantics.py:108

-error[missing-argument] No argument provided for required parameter `**kwargs`
+error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `Literal[1]`

@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 3, 2026

mypy_primer results

Changes were detected when running on open source projects
pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- 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]`
- Found 174 diagnostics
+ Found 173 diagnostics

async-utils (https://github.com/mikeshardmind/async-utils)
+ src/async_utils/gen_transform.py:132: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 2 diagnostics
+ Found 3 diagnostics

spack (https://github.com/spack/spack)
+ 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/vendor/macholib/MachOStandalone.py:25:9: error[invalid-method-override] Invalid override of method `createNode`: Definition is incompatible with `ObjectGraph.createNode`

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

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/auth.py:183:23: warning[redundant-cast] Value is already of type `(...) -> BasicAuthWebSocketServerProtocol`
- Found 44 diagnostics
+ Found 45 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:147:38: error[unbound-type-variable] Type variable `_SelfT` is not bound to any outer generic context
+ 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_crawler.py:179:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:233:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:259:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:313:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:339:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:393:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:419:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
- tests/test_crawler.py:473:17: error[invalid-method-override] Invalid override of method `from_crawler`: Definition is incompatible with `Spider.from_crawler`
+ 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 `dict[Unknown, Unknown]`
+ tests/test_http_request.py:194:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Response, /, *args: Any, **kwargs: Any) -> Any) | None`, found `def somecallback() -> Unknown`
+ tests/test_http_request.py:284:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Response, /, *args: Any, **kwargs: Any) -> Any) | None`, found `def a_function() -> Unknown`
+ tests/test_http_request.py:310: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:316:17: 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_request_dict.py:88:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `((Response, /, *args: Any, **kwargs: Any) -> Any) | None`, found `Unknown | (bound method MethodsSpider.parse_item() -> Unknown)`
- Found 1813 diagnostics
+ Found 1832 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:39:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:71:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:96:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:131:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:150:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:169:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:191:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:213:32: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'SessionMiddleware'>`
- tests/middleware/test_session.py:234: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:92: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 195 diagnostics
+ Found 112 diagnostics

ignite (https://github.com/pytorch/ignite)
+ ignite/handlers/checkpoint.py:1060:60: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ ignite/handlers/early_stopping.py:140:18: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 2217 diagnostics
+ Found 2219 diagnostics

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:568:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/_hypothesis.py:817:45: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:120:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:183:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:211:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:247:12: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:655:16: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:1214: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:182:24: error[missing-argument] No argument provided for required parameter `*args`
- src/schemathesis/specs/openapi/negative/__init__.py:204:16: error[missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/schemas.py:536: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 343 diagnostics
+ Found 328 diagnostics

Expression (https://github.com/cognitedata/Expression)
+ 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:592:1: error[invalid-argument-type] Argument is incorrect: Expected `[_TSource](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 `[_TSource](Never, /, count: int) -> Never`, found `def take_last[_TSource](source: TypedArray[_TSource], count: int) -> 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: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:873:1: error[invalid-argument-type] Argument is incorrect: Expected `[_TSource](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 `[_TSource](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 `[_TSourceSortable](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:947:1: error[invalid-argument-type] Argument is incorrect: Expected `[_TSource](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 `[_TSource](Never, /, count: int) -> Never`, found `def take_last[_TSource](source: Block[_TSource], count: int) -> Block[_TSource]`
+ 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: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: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/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: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:846:1: error[invalid-argument-type] Argument is incorrect: Expected `[_TSource](Never, /, count: int) -> Never`, found `def skip[_TSource](source: Iterable[_TSource], count: int) -> Iterable[_TSource]`
+ expression/collections/seq.py:892:1: error[invalid-argument-type] Argument is incorrect: Expected `[_TSource](Never, /, count: int) -> Never`, found `def take[_TSource](source: Iterable[_TSource], count: int) -> Iterable[_TSource]`
+ 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 `(_B'return@curry & Parser[Any]) | (_A'return@curry & Parser[Any])`, found `Parser[_A@Parser]`
+ expression/extra/parser.py:86:28: error[invalid-argument-type] Argument is incorrect: Expected `(_B'return@curry & Parser[Any]) | (_A'return@curry & Parser[Any])`, found `Parser[Any]`
+ 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: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 `[_B](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: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]`
+ 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 210 diagnostics
+ Found 258 diagnostics

antidote (https://github.com/Finistere/antidote)
+ src/antidote/core/_inject.py:295:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(type[Unknown], /, *args: object, **kwargs: object) -> object`, found `Top[(...) -> object]`
- tests/core/test_inject.py:541:29: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ tests/core/test_inject.py:549:13: error[invalid-argument-type] Argument to bound method `method` is incorrect: Expected `(Any, /, *args: Unknown, **kwargs: Unknown) -> Unknown`, found `def no_args() -> object`
- tests/lib/lazy/test_lazy.py:299:27: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/lazy/test_lazy.py:458:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/lazy/test_lazy.py:471:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/lazy/test_lazy.py:835:27: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/lazy/test_lazy.py:1144:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 237 diagnostics
+ Found 233 diagnostics

Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ tanjun/_internal/__init__.py:83:16: error[invalid-return-type] Return type does not match returned value: expected `bool`, found `Literal[True] | (Coroutine[Any, Any, bool] & ~AlwaysFalsy)`
+ tanjun/annotations.py:451:17: error[invalid-argument-type] Argument is incorrect: Expected `Sequence[(str, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any] | Any]`, found `(((str, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any] | Any) & Sequence[object]) | Sequence[(str, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any] | Any]`
+ tanjun/annotations.py:1538:79: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(str, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any] | Any`, found `object`
+ tanjun/annotations.py:1538:79: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `(str, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any] | Any`, found `object`
- tanjun/checks.py:1051:23: error[invalid-type-arguments] Type `TypeVar` is not assignable to upper bound `Context` of type variable `_ContextT@_AllChecks`
+ tanjun/clients.py:1893:28: error[invalid-argument-type] Argument to bound method `add_check` is incorrect: Expected `(Context, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, bool] | bool`, found `(def _check_human(ctx: Context, /) -> bool) & ~((Context, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, bool] | bool)`
+ tanjun/clients.py:2294:27: error[not-iterable] Object of type `Iterable[str] | Coroutine[Any, Any, Iterable[str]]` may not be iterable
+ tanjun/parsing.py:1553:37: error[invalid-argument-type] Argument to bound method `_add_converter` is incorrect: Expected `(str, /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any] | Any`, found `object`
- Found 131 diagnostics
+ Found 137 diagnostics

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:149:92: error[invalid-type-form] `...` is not allowed in this context in a type expression
+ 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/errors.py:453:95: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Unknown]` has no attribute `__qualname__`
+ discord/app_commands/errors.py:453:95: error[unresolved-attribute] Object of type `Top[(...) -> Coroutine[Any, Any, object]]` has no attribute `__qualname__`
+ 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-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/bot.py:330:50: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/cog.py:335:27: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, Any]` has no attribute `__name__`
+ discord/ext/commands/cog.py:335:27: error[unresolved-attribute] Object of type `((Self@__new__, Context[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any]) | ((Context[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any])` has no attribute `__name__`
- discord/ext/commands/core.py:433:38: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__name__`
- discord/ext/commands/core.py:462:22: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_checks__`
- discord/ext/commands/core.py:470:24: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_cooldown__`
- discord/ext/commands/core.py:483:31: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_max_concurrency__`
- discord/ext/commands/core.py:500:29: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__before_invoke__`
- discord/ext/commands/core.py:508:28: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__after_invoke__`
+ discord/ext/commands/core.py:433:38: error[unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__name__`
+ discord/ext/commands/core.py:462:22: error[unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:470:24: error[unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__commands_cooldown__`
+ discord/ext/commands/core.py:483:31: error[unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__commands_max_concurrency__`
+ discord/ext/commands/core.py:500:29: error[unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__before_invoke__`
+ discord/ext/commands/core.py:508:28: error[unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__after_invoke__`
- discord/ext/commands/core.py:623:77: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/ext/commands/core.py:625:67: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/ext/commands/core.py:1063:71: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/ext/commands/core.py:1673:75: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/ext/commands/core.py:1949:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Any, (...), Any] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Any, (...), Any] | ((...) -> Coroutine[Any, Any, Any])`
+ discord/ext/commands/core.py:1949:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: (...) -> Coroutine[Any, Any, Any]) -> ((...) -> Coroutine[Any, Any, Any])`
- discord/ext/commands/core.py:1956:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Any, (...), Any] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Any, (...), Any] | ((...) -> Coroutine[Any, Any, Any])`
+ discord/ext/commands/core.py:1956:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: (...) -> Coroutine[Any, Any, Any]) -> ((...) -> Coroutine[Any, Any, Any])`
- discord/ext/commands/core.py:2373:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])`
- discord/ext/commands/core.py:2380:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])`
+ discord/ext/commands/core.py:2373:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: (...) -> Coroutine[Any, Any, Any]) -> ((...) -> Coroutine[Any, Any, Any])`
+ discord/ext/commands/core.py:2380:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: (...) -> Coroutine[Any, Any, Any]) -> ((...) -> Coroutine[Any, Any, Any])`
- discord/ext/commands/core.py:2448:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])`
- discord/ext/commands/core.py:2455:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])) -> Command[Unknown, (...), Unknown] | ((...) -> Coroutine[Any, Any, Any])`
+ discord/ext/commands/core.py:2448:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: (...) -> Coroutine[Any, Any, Any]) -> ((...) -> Coroutine[Any, Any, Any])`
+ discord/ext/commands/core.py:2455:9: error[unresolved-attribute] Unresolved attribute `predicate` on type `def decorator(func: (...) -> Coroutine[Any, Any, Any]) -> ((...) -> Coroutine[Any, Any, Any])`
- discord/ext/commands/hybrid.py:328:9: error[unresolved-attribute] Unresolved attribute `__signature__` on type `(...) -> Coroutine[Any, Any, T@HybridAppCommand]`
+ discord/ext/commands/hybrid.py:328:9: error[invalid-assignment] Object of type `Signature` is not assignable to attribute `__signature__` on type `((CogT@HybridAppCommand, Context[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, T@HybridAppCommand]) | ((Context[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, T@HybridAppCommand])`
- discord/ext/commands/hybrid.py:338:17: error[unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@HybridAppCommand]` has no attribute `__signature__`
+ discord/ext/commands/hybrid.py:338:17: error[unresolved-attribute] Object of type `((CogT@HybridAppCommand, Context[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, T@HybridAppCommand]) | ((Context[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, T@HybridAppCommand])` has no attribute `__signature__`
- discord/ext/commands/hybrid.py:512:37: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:850:42: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:860:51: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:874:42: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:884:51: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:898:38: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:936:47: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:950:38: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/hybrid.py:970:47: error[invalid-type-arguments] Too many type arguments: expected 1, got 4
- Found 551 diagnostics
+ Found 521 diagnostics

mkdocs (https://github.com/mkdocs/mkdocs)
- mkdocs/plugins.py:490:32: error[unresolved-attribute] Attribute `__get__` is not defined on `(...) -> T@CombinedEvent` in union `Unknown | ((...) -> T@CombinedEvent)`
+ mkdocs/plugins.py:490:32: error[unresolved-attribute] Attribute `__get__` is not defined on `(Any, /, *args: P@CombinedEvent.args, **kwargs: P@CombinedEvent.kwargs) -> T@CombinedEvent` in union `Unknown | ((Any, /, *args: P@CombinedEvent.args, **kwargs: P@CombinedEvent.kwargs) -> T@CombinedEvent)`

trio (https://github.com/python-trio/trio)
- src/trio/_path.py:107:48: error[unresolved-attribute] Object of type `(...) -> Iterable[Path]` has no attribute `__name__`
+ src/trio/_path.py:107:48: error[unresolved-attribute] Object of type `(Path, /, *args: P@_wrap_method_path_iterable.args, **kwargs: P@_wrap_method_path_iterable.kwargs) -> Iterable[Path]` has no attribute `__name__`
- src/trio/_socket.py:442:54: error[unresolved-attribute] Object of type `(...) -> T@_make_simple_sock_method_wrapper` has no attribute `__name__`
+ src/trio/_socket.py:442:54: error[unresolved-attribute] Object of type `(socket, /, *args: P@_make_simple_sock_method_wrapper.args, **kwargs: P@_make_simple_sock_method_wrapper.kwargs) -> T@_make_simple_sock_method_wrapper` has no attribute `__name__`
- src/trio/_socket.py:447:71: error[unresolved-attribute] Object of type `(...) -> T@_make_simple_sock_method_wrapper` has no attribute `__name__`
+ src/trio/_socket.py:447:71: error[unresolved-attribute] Object of type `(socket, /, *args: P@_make_simple_sock_method_wrapper.args, **kwargs: P@_make_simple_sock_method_wrapper.kwargs) -> T@_make_simple_sock_method_wrapper` has no attribute `__name__`
+ src/trio/_socket.py:1034:28: error[missing-argument] No argument provided for required parameter 1
- src/trio/_socket.py:1123:12: error[invalid-assignment] Object of type `(...) -> Awaitable[bytes]` is not assignable to `def recv(self, buflen: int, flags: int = 0, /) -> Awaitable[bytes]`
+ src/trio/_socket.py:1123:12: error[invalid-assignment] Object of type `(_SocketType, bufsize: int, flags: int = 0, /) -> Awaitable[bytes]` is not assignable to `def recv(self, buflen: int, flags: int = 0, /) -> Awaitable[bytes]`
- src/trio/_socket.py:1142:17: error[invalid-assignment] Object of type `(...) -> Awaitable[int]` is not assignable to `def recv_into(self, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[int]`
+ src/trio/_socket.py:1142:17: error[invalid-assignment] Object of type `(_SocketType, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[int]` is not assignable to `def recv_into(self, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[int]`
- src/trio/_socket.py:1160:16: error[invalid-assignment] Object of type `(...) -> Awaitable[tuple[bytes, Any]]` is not assignable to `def recvfrom(self, bufsize: int, flags: int = 0, /) -> Awaitable[tuple[bytes, Any]]`
+ src/trio/_socket.py:1160:16: error[invalid-assignment] Object of type `(_SocketType, bufsize: int, flags: int = 0, /) -> Awaitable[tuple[bytes, Any]]` is not assignable to `def recvfrom(self, bufsize: int, flags: int = 0, /) -> Awaitable[tuple[bytes, Any]]`
- src/trio/_socket.py:1179:21: error[invalid-assignment] Object of type `(...) -> Awaitable[tuple[int, Any]]` is not assignable to `def recvfrom_into(self, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[tuple[int, Any]]`
+ src/trio/_socket.py:1179:21: error[invalid-assignment] Object of type `(_SocketType, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[tuple[int, Any]]` is not assignable to `def recvfrom_into(self, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[tuple[int, Any]]`
- src/trio/_socket.py:1201:19: error[invalid-assignment] Object of type `(...) -> Awaitable[tuple[bytes, list[tuple[int, int, bytes]], int, Any]]` is not assignable to `def recvmsg(self, bufsize: int, ancbufsize: int = 0, flags: int = 0, /) -> Awaitable[tuple[bytes, list[tuple[int, int, bytes]], int, object]]`
+ src/trio/_socket.py:1201:19: error[invalid-assignment] Object of type `(_SocketType, bufsize: int, ancbufsize: int = 0, flags: int = 0, /) -> Awaitable[tuple[bytes, list[tuple[int, int, bytes]], int, Any]]` is not assignable to `def recvmsg(self, bufsize: int, ancbufsize: int = 0, flags: int = 0, /) -> Awaitable[tuple[bytes, list[tuple[int, int, bytes]], int, object]]`
- src/trio/_socket.py:1224:24: error[invalid-assignment] Object of type `(...) -> Awaitable[tuple[int, list[tuple[int, int, bytes]], int, Any]]` is not assignable to `def recvmsg_into(self, buffers: Iterable[Buffer], ancbufsize: int = 0, flags: int = 0, /) -> Awaitable[tuple[int, list[tuple[int, int, bytes]], int, object]]`
+ src/trio/_socket.py:1224:24: error[invalid-assignment] Object of type `(_SocketType, buffers: Iterable[Buffer], ancbufsize: int = 0, flags: int = 0, /) -> Awaitable[tuple[int, list[tuple[int, int, bytes]], int, Any]]` is not assignable to `def recvmsg_into(self, buffers: Iterable[Buffer], ancbufsize: int = 0, flags: int = 0, /) -> Awaitable[tuple[int, list[tuple[int, int, bytes]], int, object]]`
- src/trio/_socket.py:1238:12: error[invalid-assignment] Object of type `(...) -> Awaitable[int]` is not assignable to `def send(self, bytes: Buffer, flags: int = 0, /) -> Awaitable[int]`
+ src/trio/_socket.py:1238:12: error[invalid-assignment] Object of type `(_SocketType, data: Buffer, flags: int = 0, /) -> Awaitable[int]` is not assignable to `def send(self, bytes: Buffer, flags: int = 0, /) -> Awaitable[int]`
+ src/trio/_socket.py:1276:13: error[invalid-argument-type] Argument to bound method `_nonblocking_helper` is incorrect: Expected `Buffer`, found `object`
+ src/trio/_socket.py:1276:13: error[invalid-argument-type] Argument to bound method `_nonblocking_helper` is incorrect: Expected `tuple[Any, ...] | str | Buffer`, found `object`
- src/trio/_tests/test_path.py:124:12: error[unresolved-attribute] Attribute `__name__` is not defined on `[PathT'return](...) -> Awaitable[PathT'return]` in union `Unknown | ([PathT'return](...) -> Awaitable[Pa

... (truncated 664 lines) ...

@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 3, 2026

Memory usage report

Memory usage unchanged ✅

@dhruvmanila dhruvmanila force-pushed the dhruv/typing-concatenate branch 2 times, most recently from 82a55c6 to 54c635c Compare March 16, 2026 11:40
@dhruvmanila dhruvmanila changed the base branch from main to dhruv/paramspec-relation-check March 16, 2026 11:41
@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 16, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 159 152 8
missing-argument 49 31 0
unresolved-attribute 5 1 72
invalid-return-type 46 3 6
invalid-method-override 0 50 0
invalid-await 0 40 0
type-assertion-failure 2 24 11
no-matching-overload 22 11 0
invalid-context-manager 0 0 32
invalid-type-arguments 0 24 0
invalid-assignment 2 8 9
unused-type-ignore-comment 3 16 0
too-many-positional-arguments 4 0 0
unused-ignore-comment 3 0 0
invalid-type-form 0 1 0
not-iterable 1 0 0
redundant-cast 1 0 0
unbound-type-variable 0 1 0
Total 297 362 138

Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.

Showing a random sample of 100 of 649 changes. See the HTML report for the full diff.

Raw diff sample (100 of 649 changes)
Expression (https://github.com/cognitedata/Expression)
+ expression/collections/array.py:592:1 [error] [invalid-argument-type] Argument is incorrect: Expected `[_TSource](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 `[_TSource](Never, /, count: int) -> Never`, found `def take_last[_TSource](source: TypedArray[_TSource], count: int) -> TypedArray[_TSource]`
+ 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/extra/parser.py:54:39 [error] [invalid-argument-type] Argument is incorrect: Expected `Never`, found `Parser[_B@ignore_then]`
+ 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_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`

altair (https://github.com/vega/altair)
- altair/utils/_transformed_data.py:114:10 [error] [invalid-context-manager] Object of type `PluginEnabler[Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
+ altair/utils/_transformed_data.py:114:10 [error] [invalid-context-manager] Object of type `PluginEnabler[(dict[Any, Any] | NativeDataFrame | narwhals.stable.v1.typing.DataFrameLike | ... omitted 3 union elements, /, *args: Unknown, **kwargs: Unknown) -> Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
- tests/test_jupyter_chart.py:206:10 [error] [invalid-context-manager] Object of type `PluginEnabler[Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
+ tests/test_jupyter_chart.py:206:10 [error] [invalid-context-manager] Object of type `PluginEnabler[(dict[Any, Any] | NativeDataFrame | narwhals.stable.v1.typing.DataFrameLike | ... omitted 3 union elements, /, *args: Unknown, **kwargs: Unknown) -> Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
- tests/utils/test_mimebundle.py:231:10 [error] [invalid-context-manager] Object of type `PluginEnabler[Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
+ tests/utils/test_mimebundle.py:231:10 [error] [invalid-context-manager] Object of type `PluginEnabler[(dict[Any, Any] | NativeDataFrame | narwhals.stable.v1.typing.DataFrameLike | ... omitted 3 union elements, /, *args: Unknown, **kwargs: Unknown) -> Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
- tests/vegalite/v6/test_api.py:990:10 [error] [invalid-context-manager] Object of type `PluginEnabler[Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
+ tests/vegalite/v6/test_api.py:990:10 [error] [invalid-context-manager] Object of type `PluginEnabler[(dict[Any, Any] | NativeDataFrame | narwhals.stable.v1.typing.DataFrameLike | ... omitted 3 union elements, /, *args: Unknown, **kwargs: Unknown) -> Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
- tests/vegalite/v6/test_data.py:27:13 [error] [invalid-context-manager] Object of type `PluginEnabler[Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`
+ tests/vegalite/v6/test_data.py:27:13 [error] [invalid-context-manager] Object of type `PluginEnabler[(dict[Any, Any] | NativeDataFrame | narwhals.stable.v1.typing.DataFrameLike | ... omitted 3 union elements, /, *args: Unknown, **kwargs: Unknown) -> Unknown, Unknown]` cannot be used with `with` because it does not correctly implement `__exit__`

antidote (https://github.com/Finistere/antidote)
- tests/lib/lazy/test_lazy.py:299:27 [warning] [unused-type-ignore-comment] Unused blanket `type: ignore` directive

apprise (https://github.com/caronc/apprise)
- tests/test_config_http.py:73:13 [error] [invalid-method-override] Invalid override of method `url`: Definition is incompatible with `URLBase.url`
- tests/test_notification_manager.py:95:13 [error] [invalid-method-override] Invalid override of method `url`: Definition is incompatible with `URLBase.url`

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

colour (https://github.com/colour-science/colour)
- colour/algebra/extrapolation.py:157:52 [error] [invalid-assignment] Object of type `NullInterpolator` is not assignable to `ProtocolInterpolator`: Incompatible value of type `NullInterpolator`
- colour/algebra/tests/test_extrapolation.py:172:41 [error] [invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ProtocolInterpolator | None`, found `LinearInterpolator`
- colour/notation/munsell/centore2014.py:718:26 [error] [invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ProtocolInterpolator | None`, found `LinearInterpolator`

core (https://github.com/home-assistant/core)
- homeassistant/components/androidtv/entity.py:75:21 [error] [unresolved-attribute] Object of type `(...) -> Awaitable[_R@_adb_decorator]` has no attribute `__name__`
+ homeassistant/components/androidtv/entity.py:75:21 [error] [unresolved-attribute] Object of type `(_ADBDeviceT@_adb_decorator, /, *args: _P@_adb_decorator.args, **kwargs: _P@_adb_decorator.kwargs) -> Awaitable[_R@_adb_decorator]` has no attribute `__name__`
- homeassistant/components/cast/media_player.py:105:46 [error] [unresolved-attribute] Object of type `(...) -> _R@api_error` has no attribute `__name__`
+ homeassistant/components/cast/media_player.py:105:46 [error] [unresolved-attribute] Object of type `(_CastDeviceT@api_error, /, *args: _P@api_error.args, **kwargs: _P@api_error.kwargs) -> _R@api_error` has no attribute `__name__`
- homeassistant/components/denonavr/media_player.py:200:17 [error] [unresolved-attribute] Object of type `(...) -> Awaitable[_R@async_log_errors]` has no attribute `__name__`
+ homeassistant/components/denonavr/media_player.py:200:17 [error] [unresolved-attribute] Object of type `(_DenonDeviceT@async_log_errors, /, *args: _P@async_log_errors.args, **kwargs: _P@async_log_errors.kwargs) -> Awaitable[_R@async_log_errors]` has no attribute `__name__`
+ homeassistant/components/hassio/addon_manager.py:58:43 [error] [invalid-argument-type] Argument is incorrect: Expected `_AddonManagerT@handle_hassio_api_error`, found `_AddonManagerT@wrapper`
+ homeassistant/components/hassio/addon_manager.py:58:49 [error] [invalid-argument-type] Argument is incorrect: Expected `_P@handle_hassio_api_error.args`, found `_P@wrapper.args`
+ homeassistant/components/openhome/media_player.py:83:12 [error] [invalid-return-type] Return type does not match returned value: expected `[_OpenhomeDeviceT'return, **_P'return, _R'return]((_OpenhomeDeviceT'return, /, *args: _P'return.args, **kwargs: _P'return.kwargs) -> Awaitable[_R'return], /) -> ((_OpenhomeDeviceT'return, /, *args: _P'return.args, **kwargs: _P'return.kwargs) -> Coroutine[Any, Any, _R'return | None])`, found `def call_wrapper(func: _FuncType[_OpenhomeDeviceT@call_wrapper, _P@call_wrapper, _R@call_wrapper]) -> _ReturnFuncType[_OpenhomeDeviceT@call_wrapper, _P@call_wrapper, _R@call_wrapper]`
- homeassistant/components/openhome/media_player.py:78:55 [error] [unresolved-attribute] Object of type `(...) -> Awaitable[_R@call_wrapper]` has no attribute `__name__`
+ homeassistant/components/openhome/media_player.py:78:55 [error] [unresolved-attribute] Object of type `(_OpenhomeDeviceT@call_wrapper, /, *args: _P@call_wrapper.args, **kwargs: _P@call_wrapper.kwargs) -> Awaitable[_R@call_wrapper]` has no attribute `__name__`
- homeassistant/components/openhome/media_player.py:81:16 [error] [invalid-return-type] Return type does not match returned value: expected `_ReturnFuncType[_OpenhomeDeviceT@catch_request_errors, _P@catch_request_errors, _R@call_wrapper]`, found `_Wrapped[(...), Awaitable[_R@call_wrapper], (self: _OpenhomeDeviceT@catch_request_errors, *args: _P@catch_request_errors.args, **kwargs: _P@catch_request_errors.kwargs), CoroutineType[Any, Any, _R@wrapper | None]]`
+ homeassistant/components/openhome/media_player.py:81:16 [error] [invalid-return-type] Return type does not match returned value: expected `_ReturnFuncType[_OpenhomeDeviceT@call_wrapper, _P@call_wrapper, _R@call_wrapper]`, found `_Wrapped[(_OpenhomeDeviceT@call_wrapper, /, *args: _P@call_wrapper.args, **kwargs: _P@call_wrapper.kwargs), Awaitable[_R@call_wrapper], (self: _OpenhomeDeviceT@wrapper, *args: _P@wrapper.args, **kwargs: _P@wrapper.kwargs), CoroutineType[Any, Any, _R@wrapper | None]]`
+ homeassistant/components/roku/helpers.py:42:28 [error] [invalid-argument-type] Argument is incorrect: Expected `_RokuEntityT@decorator`, found `_RokuEntityT@wrapper`
+ homeassistant/components/roku/helpers.py:42:41 [error] [invalid-argument-type] Argument is incorrect: Expected `_P@decorator.kwargs`, found `_P@wrapper.kwargs`
- homeassistant/components/russound_rio/entity.py:33:38 [error] [unresolved-attribute] Object of type `(...) -> Awaitable[None]` has no attribute `__name__`
+ homeassistant/components/russound_rio/entity.py:33:38 [error] [unresolved-attribute] Object of type `(_EntityT@command, /, *args: _P@command.args, **kwargs: _P@command.kwargs) -> Awaitable[None]` has no attribute `__name__`
- homeassistant/components/tplink/entity.py:132:29 [error] [unresolved-attribute] Object of type `(...) -> Awaitable[None]` has no attribute `__name__`
+ homeassistant/components/tplink/entity.py:132:29 [error] [unresolved-attribute] Object of type `(_T@async_refresh_after, /, *args: _P@async_refresh_after.args, **kwargs: _P@async_refresh_after.kwargs) -> Awaitable[None]` has no attribute `__name__`

discord.py (https://github.com/Rapptz/discord.py)
- discord/app_commands/commands.py:657:43 [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/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/ext/commands/bot.py:306:50 [error] [invalid-type-arguments] Too many type arguments: expected 1, got 4
- discord/ext/commands/core.py:462:22 [error] [unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:462:22 [error] [unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__commands_checks__`
- discord/ext/commands/core.py:470:24 [error] [unresolved-attribute] Object of type `(...) -> Coroutine[Any, Any, T@Command]` has no attribute `__commands_cooldown__`
+ discord/ext/commands/core.py:470:24 [error] [unresolved-attribute] Object of type `((CogT@Command, Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command]) | ((Context[Any], /, *args: P@Command.args, **kwargs: P@Command.kwargs) -> Coroutine[Any, Any, T@Command])` has no attribute `__commands_cooldown__`

hydpy (https://github.com/hydpy-dev/hydpy)
- hydpy/core/importtools.py:1084:39 [error] [unresolved-attribute] Object of type `(...) -> None` has no attribute `__name__`
+ hydpy/core/importtools.py:1084:39 [error] [unresolved-attribute] Object of type `(TM_contra@TargetParameterUpdater, /, *args: P_@TargetParameterUpdater.args, **kwargs: P_@TargetParameterUpdater.kwargs) -> None` has no attribute `__name__`

jax (https://github.com/google/jax)
- jax/_src/pallas/mosaic/random.py:159:40 [error] [invalid-argument-type] Argument to function `_make_stateful_sampler` is incorrect: Expected `SampleFn`, found `def bits(key: Array | ndarray[tuple[Any, ...], dtype[Any]] | bool[bool] | ... omitted 4 union elements, shape: Sequence[int] = ..., dtype: str | type[Any] | dtype[Any] | SupportsDType | None = None, *, out_sharding=None) -> Array`
- jax/_src/callback.py:249:41 [error] [invalid-argument-type] Argument to function `register_lowering` is incorrect: Expected `LoweringRule`, found `def pure_callback_lowering(ctx, *args, *, callback: _FlatCallback, sharding: SingleDeviceSharding | None, **params) -> Unknown`

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/frame.py:17384:9 [error] [invalid-method-override] Invalid override of method `cummax`: Definition is incompatible with `NDFrame.cummax`

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/frame/test_groupby.py:488:23 [error] [no-matching-overload] No overload of bound method `apply` matches arguments
- tests/frame/test_groupby.py:502:9 [error] [type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`
- tests/series/test_series.py:1108:9 [error] [type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
+ tests/series/test_series.py:2496:9 [error] [no-matching-overload] No overload of bound method `pipe` matches arguments
+ tests/series/test_series.py:2524:9 [error] [no-matching-overload] No overload of bound method `pipe` matches arguments
- tests/test_groupby.py:208:11 [error] [type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`
+ tests/test_resampler.py:191:9 [error] [no-matching-overload] No overload of bound method `pipe` matches arguments
+ tests/test_resampler.py:198:9 [error] [no-matching-overload] No overload of bound method `pipe` matches arguments

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- 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]`

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/specs/openapi/adapter/parameters.py:120:12 [error] [missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:211:12 [error] [missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/adapter/parameters.py:1214:16 [error] [missing-argument] No arguments provided for required parameters `*args`, `**kwargs`
- src/schemathesis/specs/openapi/negative/__init__.py:204:16 [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`

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/integrate/test_quad_vec.pyi:55:1 [error] [type-assertion-failure] Type `tuple[Unknown, int | float]` does not match asserted type `tuple[float64, int | float]`
- tests/integrate/test_quad_vec.pyi:20:1 [error] [type-assertion-failure] Type `tuple[float64, int | float]` does not match asserted type `tuple[int | float | complex, int | float]`
+ tests/integrate/test_quad_vec.pyi:20:1 [error] [type-assertion-failure] Type `tuple[Unknown, int | float]` does not match asserted type `tuple[int | float | complex, int | float]`
- tests/integrate/test_quad_vec.pyi:21:1 [error] [type-assertion-failure] Type `float64` does not match asserted type `int | float | complex`
+ tests/integrate/test_quad_vec.pyi:21:1 [error] [type-assertion-failure] Type `Unknown` does not match asserted type `int | float | complex`
- tests/integrate/test_quad_vec.pyi:42:1 [error] [type-assertion-failure] Type `float64` does not match asserted type `floating[_32Bit]`
+ tests/integrate/test_quad_vec.pyi:42:1 [error] [type-assertion-failure] Type `Unknown` does not match asserted type `floating[_32Bit]`
- tests/integrate/test_quad_vec.pyi:83:1 [error] [type-assertion-failure] Type `tuple[float64, int | float]` does not match asserted type `tuple[complex128, int | float]`
+ tests/integrate/test_quad_vec.pyi:83:1 [error] [type-assertion-failure] Type `tuple[Unknown, int | float]` does not match asserted type `tuple[complex128, int | float]`

scrapy (https://github.com/scrapy/scrapy)
- scrapy/utils/python.py:147:38 [error] [unbound-type-variable] Type variable `_SelfT` is not bound to any outer generic context
+ tests/test_contracts.py:336:26 [error] [invalid-argument-type] Argument is incorrect: Expected `Response`, found `ResponseMock`
+ 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:431: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`

spack (https://github.com/spack/spack)
- lib/spack/spack/vendor/macholib/MachOStandalone.py:25:9 [error] [invalid-method-override] Invalid override of method `createNode`: Definition is incompatible with `ObjectGraph.createNode`

starlette (https://github.com/encode/starlette)
- 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:285: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_middleware.py:21:36 [error] [invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'CustomMiddleware'>`
- 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:434:24 [error] [invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ContextManagerMiddleware'>`
- 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:843:32 [error] [invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `_MiddlewareFactory[(...)]`, found `<class 'ConsumingMiddleware'>`
- 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: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'>`

svcs (https://github.com/hynek/svcs)
+ tests/typing/starlette.py:59:62 [warning] [unused-ignore-comment] Unused `ty: ignore` directive

sympy (https://github.com/sympy/sympy)
- sympy/physics/control/lti.py:1973:9 [error] [invalid-method-override] Invalid override of method `from_rational_expression`: Definition is incompatible with `TransferFunctionBase.from_rational_expression`
- sympy/physics/control/lti.py:1991:9 [error] [invalid-method-override] Invalid override of method `from_zpk`: Definition is incompatible with `TransferFunctionBase.from_zpk`
- sympy/vector/basisdependent.py:240:9 [error] [invalid-method-override] Invalid override of method `_new_rawargs`: Definition is incompatible with `AssocOp._new_rawargs`

trio (https://github.com/python-trio/trio)
+ src/trio/_socket.py:1034:28 [error] [missing-argument] No argument provided for required parameter 1
- src/trio/_socket.py:1142:17 [error] [invalid-assignment] Object of type `(...) -> Awaitable[int]` is not assignable to `def recv_into(self, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[int]`
+ src/trio/_socket.py:1142:17 [error] [invalid-assignment] Object of type `(_SocketType, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[int]` is not assignable to `def recv_into(self, /, buffer: Buffer, nbytes: int = 0, flags: int = 0) -> Awaitable[int]`
+ src/trio/_tests/test_path.py:218:28 [error] [missing-argument] No argument provided for required parameter `pattern`
+ src/trio/_tests/test_path.py:226:35 [error] [invalid-argument-type] Argument is incorrect: Argument type `Literal["*.txt"]` does not satisfy upper bound `Path` of type variable `PathT'return`
- src/trio/_tests/test_path.py:124:12 [error] [unresolved-attribute] Attribute `__name__` is not defined on `[PathT'return](...) -> Awaitable[PathT'return]` in union `Unknown | ([PathT'return](...) -> Awaitable[PathT'return])`
+ src/trio/_tests/test_path.py:124:12 [error] [unresolved-attribute] Attribute `__name__` is not defined on `[PathT'return](PathT'return, /, strict: bool = False) -> Awaitable[PathT'return]` in union `Unknown | ([PathT'return](PathT'return, /, strict: bool = False) -> Awaitable[PathT'return])`
- src/trio/_tests/test_path.py:125:12 [error] [unresolved-attribute] Attribute `__qualname__` is not defined on `[PathT'return](...) -> Awaitable[PathT'return]` in union `Unknown | ([PathT'return](...) -> Awaitable[PathT'return])`
+ src/trio/_tests/test_path.py:125:12 [error] [unresolved-attribute] Attribute `__qualname__` is not defined on `[PathT'return](PathT'return, /, strict: bool = False) -> Awaitable[PathT'return]` in union `Unknown | ([PathT'return](PathT'return, /, strict: bool = False) -> Awaitable[PathT'return])`
+ src/trio/_tests/type_tests/path.py:100:39 [error] [invalid-argument-type] Argument is incorrect: Argument type `Literal["*.py"]` does not satisfy upper bound `Path` of type variable `PathT'return`
+ src/trio/_tests/type_tests/path.py:102:41 [error] [invalid-argument-type] Argument is incorrect: Argument type `Literal["*.py"]` does not satisfy upper bound `Path` of type variable `PathT'return`
+ src/trio/_tests/type_tests/path.py:67:34 [error] [invalid-argument-type] Argument is incorrect: Expected `Path`, found `Literal[511]`
+ src/trio/_tests/type_tests/path.py:69:23 [error] [missing-argument] No argument provided for required parameter 1
+ src/trio/_tests/type_tests/path.py:89:23 [error] [missing-argument] No argument provided for required parameter 1
+ src/trio/_tests/type_tests/path.py:96:23 [error] [missing-argument] No argument provided for required parameter 1

zulip (https://github.com/zulip/zulip)
- zerver/decorator.py:900:19 [error] [unresolved-attribute] Object of type `(...) -> HttpResponse` has no attribute `__name__`
+ zerver/decorator.py:900:19 [error] [unresolved-attribute] Object of type `(HttpRequest, UserProfile | AnonymousUser, /, *args: ParamT@public_json_view.args, **kwargs: ParamT@public_json_view.kwargs) -> HttpResponse` has no attribute `__name__`
- zerver/lib/test_runner.py:129:32 [error] [invalid-argument-type] Argument to function `process_instrumented_calls` is incorrect: Expected `(dict[str, Any], /) -> None`, found `[**P'return](**P'return) -> Any`
- zerver/webhooks/groove/view.py:93:72 [error] [invalid-assignment] Object of type `dict[str, ((WildValue, /) -> str | None) | ([**P'return](**P'return) -> str)]` is not assignable to `dict[str, (WildValue, /) -> str | None]`
- zerver/webhooks/shortcut/view.py:737:88 [error] [invalid-assignment] Object of type `dict[str, ((WildValue, WildValue, /) -> str | None) | ([**P'return](**P'return) -> str | None)]` is not assignable to `dict[str, (WildValue, WildValue, /) -> str | None]`

Full report with detailed diff (timing results)

Base automatically changed from dhruv/paramspec-relation-check to main March 17, 2026 02:54
dhruvmanila added a commit that referenced this pull request Mar 17, 2026
…23927)

## Summary

This PR updates the constraint set assignability check to only special
case overloaded callables against a callable containing `ParamSpec` and
pass through any other callables to the check in `Signature`. This is to
make sure for `Concatenate` (ref #23689) that we make sure that it goes
through to `Signature` where the type checking / constraint set building
would take place.

Here are the detailed list of changes:

In `check_callable_signature_pair_inner`,
- Delegate the branch where both sides contain single signature with
`ParamSpec` as the only parameter to `check_signature_pair`
- For other branches where one side contain a single signature with
`ParamSpec` as the only parameter, update the other side to check
whether it's an overloaded callable. The reason is that the
`signatures_is_single_paramspec` can return `None` even for
non-overloaded non-ParamSpec callable which we should delegate to
`check_signature_pair`

In `check_signature_pair_inner`,
- Move the constraint set assignability branch before any special case
of `Top` and gradual form handling. This is to support the delegation
that happened from `check_callable_signature_pair_inner` so that the
constraint set contains a node for the `ParamSpec` type variable because
otherwise we would've short-circuit for `Top` / gradual form cases.

## Test Plan

Make sure there are no regression and existing test cases pass.

I'm also working on top of this branch in #23689 to make sure these
changes are valid, so far so good.
@dhruvmanila dhruvmanila force-pushed the dhruv/typing-concatenate branch from 54c635c to ef7efba Compare March 17, 2026 02:56
@dhruvmanila dhruvmanila force-pushed the dhruv/typing-concatenate branch from ef7efba to 77f0865 Compare March 17, 2026 05:08
reveal_type(Calculator().square_then_round(3.14)) # revealed: Unknown | int
```

## Use case: Wrappers with explicit receivers
Copy link
Member Author

@dhruvmanila dhruvmanila Mar 18, 2026

Choose a reason for hiding this comment

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


class Sub23(Super4):
def method(self, x, *args, y, **kwargs): ... # error: [invalid-method-override]
```
Copy link
Member Author

Choose a reason for hiding this comment

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

This is now not an error because this PR fixes astral-sh/ty#1257 and this is a gradual callable as both *args and **kwargs are present without an annotation.

Comment on lines -1328 to 1331

# error: [invalid-argument-type]
@abstractclassmethod # error: [deprecated]
def make(cls) -> "Base":
raise NotImplementedError
Copy link
Member Author

@dhruvmanila dhruvmanila Mar 18, 2026

Choose a reason for hiding this comment

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

I'm a bit unsure on why this isn't working, it might be related to the fact that it accepts type[_T] as the first parameter. Both mypy and Pyright seems to be raising an error here as well. And, ty works correctly when using the correct way i.e.,

    @classmethod
    @abstractmethod
    def make(cls) -> "Base":
        reveal_type(cls)  # revealed: type[Self@make]
        raise NotImplementedError

@dhruvmanila
Copy link
Member Author

Follow-up tasks:

  • Reduce the complexity of check_signature_pair_inner
  • Look into a couple of TODOs
  • Better error handling similar to ParamSpec like *args and **kwargs are required arguments in certain cases

@dhruvmanila dhruvmanila marked this pull request as ready for review March 18, 2026 14:37
Comment on lines +2393 to +2399
} else if prefix_params.iter().all(Parameter::is_positional) {
// TODO: Currently, we accept both positional-only and
// positional-or-keyword parameter but we should raise a warning to
// let users know that these parameters should be positional-only
kind = ParametersKind::Concatenate(ConcatenateTail::ParamSpec(
typevar,
));
Copy link
Member Author

@dhruvmanila dhruvmanila Mar 19, 2026

Choose a reason for hiding this comment

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

We have to allow positional-or-keyword parameter here otherwise the Starlette issue (astral-sh/ty#1635) will still fail because the signature of add_middleware does not use positional-only parameter strictly:

    def add_middleware(self, middleware_class: _MiddlewareFactory[P], *args: P.args, **kwargs: P.kwargs) -> None:

https://github.com/Kludex/starlette/blob/9ee951980bae776103715b66305f807d9e8245da/starlette/applications.py#L98

I'll open an issue about that.

The warning idea as proposed is here for ref: python/mypy#21001

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

Labels

ty Multi-file analysis & type inference

Projects

None yet

2 participants