[ty] Fix ParamSpec defaults and alias variance#24479
[ty] Fix ParamSpec defaults and alias variance#24479charliermarsh wants to merge 2 commits intomainfrom
Conversation
Typing conformance results improved 🎉The percentage of diagnostics emitted that were expected errors increased from 87.72% to 87.81%. The percentage of expected errors that received a diagnostic held steady at 82.85%. The number of fully passing files held steady at 74/132. SummaryHow 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 (
Test file breakdown1 file altered
False positives removed (1)1 diagnostic
|
Memory usage reportSummary
Significant changesClick to expand detailed breakdownsphinx
prefect
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-argument-type |
90 | 1 | 0 |
invalid-await |
40 | 3 | 0 |
invalid-assignment |
6 | 0 | 11 |
invalid-return-type |
12 | 0 | 1 |
unresolved-attribute |
0 | 0 | 10 |
call-top-callable |
8 | 0 | 0 |
call-non-callable |
1 | 0 | 0 |
invalid-method-override |
1 | 0 | 0 |
missing-argument |
1 | 0 | 0 |
no-matching-overload |
1 | 0 | 0 |
unused-type-ignore-comment |
0 | 1 | 0 |
| Total | 160 | 5 | 22 |
Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.
Raw diff (70 changes)
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]`
- src/antidote/core/_injection.py:298:9 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[Top[(...)], object] & ~Top[classmethod[Unknown, Top[(...)], object]]` has no attribute `__qualname__`
+ src/antidote/core/_injection.py:298:9 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[(*args: object, **kwargs: object), object] & ~Top[classmethod[Unknown, (*args: object, **kwargs: object), object]]` has no attribute `__qualname__`
- src/antidote/core/_injection.py:298:30 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[Top[(...)], object] & ~Top[classmethod[Unknown, Top[(...)], object]]` has no attribute `__name__`
+ src/antidote/core/_injection.py:298:30 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[(*args: object, **kwargs: object), object] & ~Top[classmethod[Unknown, (*args: object, **kwargs: object), object]]` has no attribute `__name__`
- src/antidote/core/_injection.py:302:17 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[Top[(...)], object] & ~Top[classmethod[Unknown, Top[(...)], object]] & ~MethodType` has no attribute `__qualname__`
+ src/antidote/core/_injection.py:302:17 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[(*args: object, **kwargs: object), object] & ~Top[classmethod[Unknown, (*args: object, **kwargs: object), object]] & ~MethodType` has no attribute `__qualname__`
- src/antidote/core/_injection.py:302:42 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[Top[(...)], object] & ~Top[classmethod[Unknown, Top[(...)], object]] & ~MethodType` has no attribute `__name__`
+ src/antidote/core/_injection.py:302:42 error[unresolved-attribute] Object of type `((...) -> object) & ~staticmethod[(*args: object, **kwargs: object), object] & ~Top[classmethod[Unknown, (*args: object, **kwargs: object), object]] & ~MethodType` has no attribute `__name__`
anyio (https://github.com/agronholm/anyio)
+ src/anyio/functools.py:139:13 error[no-matching-overload] No overload of bound method `pop` matches arguments
+ src/anyio/functools.py:167:27 error[invalid-argument-type] Method `__getitem__` of type `bound method WeakKeyDictionary[AsyncLRUCacheWrapper[(...), Any], OrderedDict[Hashable, tuple[_InitialMissingType, Lock, int | float | None] | tuple[Any, None, int | float | None]]].__getitem__(key: AsyncLRUCacheWrapper[(...), Any]) -> OrderedDict[Hashable, tuple[_InitialMissingType, Lock, int | float | None] | tuple[Any, None, int | float | None]]` cannot be called with key of type `Self@__call__` on object of type `WeakKeyDictionary[AsyncLRUCacheWrapper[(...), Any], OrderedDict[Hashable, tuple[_InitialMissingType, Lock, int | float | None] | tuple[Any, None, int | float | None]]]`
+ src/anyio/functools.py:169:27 error[invalid-assignment] Invalid subscript assignment with key of type `Self@__call__` and value of type `OrderedDict[Hashable, tuple[_InitialMissingType, Lock, int | float | None] | tuple[Any, None, int | float | None]]` on object of type `WeakKeyDictionary[AsyncLRUCacheWrapper[(...), Any], OrderedDict[Hashable, tuple[_InitialMissingType, Lock, int | float | None] | tuple[Any, None, int | float | None]]]`
+ src/anyio/functools.py:226:37 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `AsyncLRUCacheWrapper[(...), Unknown]`, found `Self@__get__`
+ src/anyio/functools.py:228:16 error[invalid-return-type] Return type does not match returned value: expected `_LRUMethodWrapper[T@AsyncLRUCacheWrapper]`, found `_LRUMethodWrapper[T@_LRUMethodWrapper]`
core (https://github.com/home-assistant/core)
+ homeassistant/components/harmony/select.py:70:21 error[invalid-argument-type] Argument is incorrect: Expected `ActivityCallback`, found `HassJob[(activity_info: tuple[Unknown, ...]), None]`
+ homeassistant/components/harmony/select.py:71:21 error[invalid-argument-type] Argument is incorrect: Expected `ActivityCallback`, found `HassJob[(activity_info: tuple[Unknown, ...]), None]`
+ homeassistant/helpers/chat_session.py:85:13 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(now: datetime), None]`
+ homeassistant/auth/__init__.py:568:13 error[invalid-argument-type] Argument to function `async_track_point_in_utc_time` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(_: datetime | None = None), None]`
+ homeassistant/components/bluetooth/__init__.py:199:13 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(now: datetime), CoroutineType[Any, Any, None]]`
+ homeassistant/components/bond/entity.py:192:13 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(now: datetime), None]`
+ homeassistant/components/cloud/client.py:189:50 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(_: Any), CoroutineType[Any, Any, None]]`
+ homeassistant/components/google_assistant/report_state.py:65:44 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(now=None), CoroutineType[Any, Any, Unknown]]`
+ homeassistant/components/hassio/__init__.py:440:17 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(_: datetime | None = None), None]`
+ homeassistant/components/hdmi_cec/__init__.py:191:51 error[invalid-argument-type] Argument is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(now=None), Unknown]`
+ homeassistant/components/hdmi_cec/__init__.py:202:64 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(now=None), Unknown]`
+ homeassistant/components/ld2410_ble/coordinator.py:74:46 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(_now: datetime), None]`
+ homeassistant/components/nasweb/coordinator.py:178:13 error[invalid-argument-type] Argument to function `async_call_at` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(now: datetime), CoroutineType[Any, Any, None]]`
+ homeassistant/components/onvif/event_manager.py:513:35 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(_now: datetime | None = None), None]`
+ homeassistant/components/reolink/host.py:827:56 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(*_: Any), CoroutineType[Any, Any, None]]`
+ homeassistant/components/rflink/__init__.py:270:56 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(_: Exception | None = None), None]`
+ homeassistant/components/tts/__init__.py:663:13 error[invalid-argument-type] Argument to function `async_call_later` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `Unknown | HassJob[(_now: datetime), None]`
+ homeassistant/helpers/event.py:1491:48 error[invalid-argument-type] Argument to function `async_track_point_in_utc_time` is incorrect: Expected `HassJob[(datetime, /), Coroutine[Any, Any, None] | None] | ((datetime, /) -> Coroutine[Any, Any, None] | None)`, found `HassJob[(utc_now: datetime), None]`
discord.py (https://github.com/Rapptz/discord.py)
+ discord/app_commands/commands.py:748:16 error[invalid-return-type] Return type does not match returned value: expected `Command[Unknown, (...), Unknown]`, found `Self@_copy_with`
+ discord/app_commands/commands.py:761:94 error[invalid-argument-type] Argument to bound method `_checked_translate` is incorrect: Expected `TranslationContext[Literal[TranslationContextLocation.command_name], Command[Any, (...), Any] | ContextMenu] | TranslationContext[Literal[TranslationContextLocation.command_description], Command[Any, (...), Any]] | TranslationContext[Literal[TranslationContextLocation.group_name, TranslationContextLocation.group_description], Group] | ... omitted 3 union elements`, found `TranslationContext[_L@TranslationContext, _D@TranslationContext]`
+ discord/app_commands/commands.py:766:101 error[invalid-argument-type] Argument to bound method `_checked_translate` is incorrect: Expected `TranslationContext[Literal[TranslationContextLocation.command_name], Command[Any, (...), Any] | ContextMenu] | TranslationContext[Literal[TranslationContextLocation.command_description], Command[Any, (...), Any]] | TranslationContext[Literal[TranslationContextLocation.group_name, TranslationContextLocation.group_description], Group] | ... omitted 3 union elements`, found `TranslationContext[_L@TranslationContext, _D@TranslationContext]`
+ discord/app_commands/commands.py:773:77 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any]`, found `Self@get_translated_payload`
+ discord/app_commands/commands.py:847:52 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu | Group`, found `Self@_transform_arguments`
+ discord/app_commands/commands.py:873:38 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu`, found `Self@_do_call`
+ discord/app_commands/commands.py:877:38 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu`, found `Self@_do_call`
+ discord/app_commands/commands.py:899:48 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu | Group`, found `Self@_invoke_autocomplete`
+ discord/app_commands/commands.py:902:44 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu | Group`, found `Self@_invoke_autocomplete`
+ discord/app_commands/commands.py:944:30 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any]`, found `Self@parameters`
+ discord/app_commands/commands.py:965:38 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any]`, found `Self@get_parameter`
+ discord/app_commands/commands.py:2014:20 error[invalid-return-type] Return type does not match returned value: expected `Command[GroupT@decorator, P@decorator, T@decorator]`, found `Command[Unknown, (...), Unknown]`
- 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/errors.py:453:95 error[unresolved-attribute] Object of type `((object, Interaction[Any], /, *args: object, **kwargs: object) -> Coroutine[Any, Any, object]) | ((Interaction[Any], /, *args: object, **kwargs: object) -> Coroutine[Any, Any, object]) | ((Any, Interaction[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any]) | ((Interaction[Any], /, *args: Any, **kwargs: Any) -> Coroutine[Any, Any, Any])` has no attribute `__qualname__`
+ discord/app_commands/tree.py:932:20 error[invalid-return-type] Return type does not match returned value: expected `Command[Group, P@decorator, T@decorator]`, found `Command[Unknown, (...), Unknown]`
+ discord/ext/commands/core.py:958:9 error[invalid-assignment] Object of type `Self@prepare` is not assignable to attribute `command` of type `Command[Any, (...), Any] | None`
+ discord/ext/commands/core.py:1067:9 error[invalid-assignment] Object of type `Self@reinvoke` is not assignable to attribute `command` of type `Command[Any, (...), Any] | None`
+ discord/ext/commands/core.py:1304:9 error[invalid-assignment] Object of type `Self@can_run` is not assignable to attribute `command` of type `Command[Any, (...), Any] | None`
+ discord/ext/commands/core.py:1691:13 error[invalid-assignment] Object of type `Self@reinvoke` is not assignable to attribute `command` of type `Command[Any, (...), Any] | None`
- discord/ext/commands/core.py:1942:17 error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>`
+ discord/ext/commands/core.py:1942:17 error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]] & ~<Protocol with members '__commands_checks__'>`
- discord/ext/commands/core.py:1944:13 error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:1944:13 error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]` has no attribute `__commands_checks__`
- discord/ext/commands/core.py:2365:17 error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>`
+ discord/ext/commands/core.py:2365:17 error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]] & ~<Protocol with members '__commands_checks__'>`
- discord/ext/commands/core.py:2367:13 error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:2367:13 error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]` has no attribute `__commands_checks__`
- discord/ext/commands/core.py:2368:13 error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_guild_only__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2368:13 error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_guild_only__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/core.py:2440:17 error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>`
+ discord/ext/commands/core.py:2440:17 error[invalid-assignment] Object of type `list[Unknown]` is not assignable to attribute `__commands_checks__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]] & ~<Protocol with members '__commands_checks__'>`
- discord/ext/commands/core.py:2442:13 error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:2442:13 error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]` has no attribute `__commands_checks__`
- discord/ext/commands/core.py:2443:13 error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_is_nsfw__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2443:13 error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_is_nsfw__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/core.py:2499:13 error[invalid-assignment] Object of type `CooldownMapping[Context[Any]]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2499:13 error[invalid-assignment] Object of type `CooldownMapping[Context[Any]]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/core.py:2547:13 error[invalid-assignment] Object of type `DynamicCooldownMapping[Context[Any]]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2547:13 error[invalid-assignment] Object of type `DynamicCooldownMapping[Context[Any]]` is not assignable to attribute `__commands_cooldown__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/core.py:2582:13 error[invalid-assignment] Object of type `MaxConcurrency` is not assignable to attribute `__commands_max_concurrency__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2582:13 error[invalid-assignment] Object of type `MaxConcurrency` is not assignable to attribute `__commands_max_concurrency__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/core.py:2634:13 error[invalid-assignment] Object of type `((CogT@before_invoke, ContextT@before_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@before_invoke, /) -> Coroutine[Any, Any, Any])` is not assignable to attribute `__before_invoke__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2634:13 error[invalid-assignment] Object of type `((CogT@before_invoke, ContextT@before_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@before_invoke, /) -> Coroutine[Any, Any, Any])` is not assignable to attribute `__before_invoke__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/core.py:2657:13 error[invalid-assignment] Object of type `((CogT@after_invoke, ContextT@after_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@after_invoke, /) -> Coroutine[Any, Any, Any])` is not assignable to attribute `__after_invoke__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2657:13 error[invalid-assignment] Object of type `((CogT@after_invoke, ContextT@after_invoke, /) -> Coroutine[Any, Any, Any]) | ((ContextT@after_invoke, /) -> Coroutine[Any, Any, Any])` is not assignable to attribute `__after_invoke__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, (...), Unknown]]`
- discord/ext/commands/hybrid.py:940:92 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ discord/ext/commands/hybrid.py:348:9 error[invalid-method-override] Invalid override of method `_copy_with`: Definition is incompatible with `Command._copy_with`
+ discord/ext/commands/hybrid.py:376:65 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu | Group`, found `Self@_transform_arguments`
+ discord/ext/commands/hybrid.py:387:65 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Command[Any, (...), Any] | ContextMenu | Group`, found `Self@_transform_arguments`
+ discord/ext/commands/hybrid.py:534:13 error[invalid-assignment] Object of type `HybridAppCommand[CogT@HybridAppCommand, P@HybridAppCommand, T@HybridAppCommand] | None` is not assignable to `HybridAppCommand[CogT@HybridCommand, (...), T@HybridCommand] | None`: Incompatible value of type `HybridAppCommand[CogT@HybridAppCommand, P@HybridAppCommand, T@HybridAppCommand] | None`
+ discord/ext/commands/hybrid.py:534:30 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `HybridCommand[CogT@HybridCommand, (...), T@HybridCommand] | HybridGroup[CogT@HybridCommand, (...), T@HybridCommand]`, found `Self@__init__`
+ discord/ext/commands/hybrid.py:700:44 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `HybridCommand[Unknown, (...), Unknown] | HybridGroup[Unknown, (...), Unknown]`, found `Self@__init__`
+ discord/ext/commands/hybrid.py:701:46 error[invalid-argument-type] Argument to bound method `add_command` is incorrect: Expected `Command[Any, (...), Any] | Group`, found `HybridAppCommand[CogT@HybridAppCommand, P@HybridAppCommand, T@HybridAppCommand]`
starlette (https://github.com/encode/starlette)
+ tests/middleware/test_base.py:247:33 error[missing-argument] No argument provided for required parameter 1 of bound method `__init__`
strawberry (https://github.com/strawberry-graphql/strawberry)
- strawberry/types/fields/resolver.py:417:20 error[invalid-return-type] Return type does not match returned value: expected `(...) -> T@StrawberryResolver`, found `Top[(...) -> object]`
+ strawberry/types/fields/resolver.py:417:20 error[invalid-return-type] Return type does not match returned value: expected `(...) -> T@StrawberryResolver`, found `((type, /, *args: object, **kwargs: object) -> object) | ((...) -> Unknown)`
streamlit (https://github.com/streamlit/streamlit)
+ lib/streamlit/runtime/caching/cache_utils.py:266:57 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `CachedFunc[_PWrapper@update_wrapper, Unknown]`, found `Self@__get__`
Summary
We now treat
typing_extensions.ParamSpecdefaults liketyping.ParamSpecdefaults, which I think was an oversight.I've also included a fix for callable signature variance inference which fell out of #24319.