Skip to content

Conversation

@theodore-ando
Copy link
Contributor

Fixes #5490
Uses pretty_callable for formatting Callable expressions that would otherwise be formatted with complex Args/VarArgs.

Avoids pretty_callable for things that would be formatted with only positional args such as Callable[[X, ..., Y], Z]

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@theodore-ando
Copy link
Contributor Author

cc @JukkaL for #5490

@theodore-ando theodore-ando changed the title Address issue #5490 Address issue #5490 - wider usage of pretty_callable for callable expressions Oct 27, 2025
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

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

pyinstrument (https://github.com/joerick/pyinstrument)
- pyinstrument/vendor/decorator.py:295: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, VarArg(Any), KwArg(Any)], Any]", variable has type "Callable[[_GeneratorContextManagerBase[Generator[Any, None, None]], Callable[..., Generator[Any, None, None]], tuple[Any, ...], dict[str, Any]], None]")  [assignment]
+ pyinstrument/vendor/decorator.py:295: error: Incompatible types in assignment (expression has type "def __init__(self: Any, g: Any, *a: Any, **k: Any) -> Any", variable has type "Callable[[_GeneratorContextManagerBase[Generator[Any, None, None]], Callable[..., Generator[Any, None, None]], tuple[Any, ...], dict[str, Any]], None]")  [assignment]
- pyinstrument/vendor/decorator.py:301: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, VarArg(Any), KwArg(Any)], Any]", variable has type "Callable[[_GeneratorContextManagerBase[Generator[Any, None, None]], Callable[..., Generator[Any, None, None]], tuple[Any, ...], dict[str, Any]], None]")  [assignment]
+ pyinstrument/vendor/decorator.py:301: error: Incompatible types in assignment (expression has type "def __init__(self: Any, g: Any, *a: Any, **k: Any) -> Any", variable has type "Callable[[_GeneratorContextManagerBase[Generator[Any, None, None]], Callable[..., Generator[Any, None, None]], tuple[Any, ...], dict[str, Any]], None]")  [assignment]

hydpy (https://github.com/hydpy-dev/hydpy)
- hydpy/auxs/statstools.py:1689: note:     def fmin(func: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., full_output: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., retall: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> ndarray[tuple[int], dtype[float64]]
+ hydpy/auxs/statstools.py:1689: note:     def fmin(func: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., full_output: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., retall: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> ndarray[tuple[int], dtype[float64]]
- hydpy/auxs/statstools.py:1689: note:     def fmin(func: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., full_output: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., *, retall: Literal[True] | numpy.bool[Literal[True]] | Literal[1], callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> tuple[ndarray[tuple[int], dtype[float64]], list[ndarray[tuple[int], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[int], dtype[float64]]]]
+ hydpy/auxs/statstools.py:1689: note:     def fmin(func: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., full_output: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., *, retall: Literal[True] | numpy.bool[Literal[True]] | Literal[1], callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> tuple[ndarray[tuple[int], dtype[float64]], list[ndarray[tuple[int], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[int], dtype[float64]]]]
- hydpy/auxs/statstools.py:1689: note:     def fmin(func: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., *, full_output: Literal[True] | numpy.bool[Literal[True]] | Literal[1], disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., retall: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> tuple[ndarray[tuple[int], dtype[float64]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], int, int, Literal[0, 1, 2, 3, 4]]
+ hydpy/auxs/statstools.py:1689: note:     def fmin(func: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., *, full_output: Literal[True] | numpy.bool[Literal[True]] | Literal[1], disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., retall: Literal[False] | numpy.bool[Literal[False]] | Literal[0] = ..., callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> tuple[ndarray[tuple[int], dtype[float64]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], int, int, Literal[0, 1, 2, 3, 4]]
- hydpy/auxs/statstools.py:1689: note:     def fmin(func: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., *, full_output: Literal[True] | numpy.bool[Literal[True]] | Literal[1], disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., retall: Literal[True] | numpy.bool[Literal[True]] | Literal[1], callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> tuple[ndarray[tuple[int], dtype[float64]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], int, int, Literal[0, 1, 2, 3, 4], list[ndarray[tuple[int], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[int], dtype[float64]]]]
+ hydpy/auxs/statstools.py:1689: note:     def fmin(func: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., xtol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., ftol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] = ..., maxiter: int | None = ..., maxfun: int | None = ..., *, full_output: Literal[True] | numpy.bool[Literal[True]] | Literal[1], disp: Literal[0, 1, 2, 3] | builtins.bool | numpy.bool[builtins.bool] = ..., retall: Literal[True] | numpy.bool[Literal[True]] | Literal[1], callback: Callable[[ndarray[tuple[int], dtype[float64]]], None] | None = ..., initial_simplex: _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ...) -> tuple[ndarray[tuple[int], dtype[float64]], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], int, int, Literal[0, 1, 2, 3, 4], list[ndarray[tuple[int], dtype[signedinteger[_32Bit | _64Bit]]] | ndarray[tuple[int], dtype[float64]]]]

spark (https://github.com/apache/spark)
- python/pyspark/pandas/frame.py:3187: error: No overload variant of "apply" of "DataFrame" matches argument types "Callable[[VarArg(Any), KwArg(Any)], Any]", "int", "Sequence[Any]", "dict[str, Any]"  [call-overload]
+ python/pyspark/pandas/frame.py:3187: error: No overload variant of "apply" of "DataFrame" matches argument types "def (*args: Any, **kwargs: Any) -> Any", "int", "Sequence[Any]", "dict[str, Any]"  [call-overload]
- python/pyspark/pandas/frame.py:3205: error: No overload variant of "apply" of "DataFrame" matches argument types "Callable[[VarArg(Any), KwArg(Any)], Any]", "int", "Sequence[Any]", "dict[str, Any]"  [call-overload]
+ python/pyspark/pandas/frame.py:3205: error: No overload variant of "apply" of "DataFrame" matches argument types "def (*args: Any, **kwargs: Any) -> Any", "int", "Sequence[Any]", "dict[str, Any]"  [call-overload]

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/pydantic.py:193: error: Incompatible types in assignment (expression has type "Callable[[type[M], KwArg(Any)], M]", variable has type overloaded function)  [assignment]
+ src/prefect/utilities/pydantic.py:193: error: Incompatible types in assignment (expression has type "def __new__(cls: type[M], **kwargs: Any) -> M", variable has type overloaded function)  [assignment]
- src/prefect/_internal/compatibility/deprecated.py:156: note: "_Wrapped[[object], None, [T, VarArg(Any), KwArg(Any)], None].__call__" has type "Callable[[Arg(T, 'self'), VarArg(Any), KwArg(Any)], None]"
+ src/prefect/_internal/compatibility/deprecated.py:156: note: "_Wrapped[[object], None, [T, VarArg(Any), KwArg(Any)], None].__call__" has type "def __call__(self: T, *args: Any, **kwargs: Any) -> None"
- src/prefect/utilities/asyncutils.py:361: note: "_Wrapped[P, Coroutine[Any, Any, Any], [VarArg(Any), DefaultNamedArg(bool | None, '_sync'), KwArg(Any)], Coroutine[Any, Any, Any]].__call__" has type "Callable[[VarArg(Any), DefaultNamedArg(bool | None, '_sync'), KwArg(Any)], Coroutine[Any, Any, Any]]"
+ src/prefect/utilities/asyncutils.py:361: note: "_Wrapped[P, Coroutine[Any, Any, Any], [VarArg(Any), DefaultNamedArg(bool | None, '_sync'), KwArg(Any)], Coroutine[Any, Any, Any]].__call__" has type "def __call__(*args: Any, _sync: bool | None = ..., **kwargs: Any) -> Coroutine[Any, Any, Any]"
- src/prefect/task_runners.py:404: error: Argument 1 to "submit" of "Executor" has incompatible type "Callable[[Callable[_P, _T], **_P], _T]"; expected "Callable[[Callable[[Task[P, R], UUID | None, TaskRun | None, dict[str, Any] | None, PrefectFuture[Any] | Any | Iterable[PrefectFuture[Any] | Any] | None, Literal['state', 'result'], dict[str, set[RunInput]] | None, dict[str, Any] | None], R | State[Any] | None], KwArg(Any)], Any | State[Any] | None]"  [arg-type]
+ src/prefect/task_runners.py:404: error: Argument 1 to "submit" of "Executor" has incompatible type "Callable[[Callable[_P, _T], **_P], _T]"; expected "def (Callable[[Task[P, R], UUID | None, TaskRun | None, dict[str, Any] | None, PrefectFuture[Any] | Any | Iterable[PrefectFuture[Any] | Any] | None, Literal['state', 'result'], dict[str, set[RunInput]] | None, dict[str, Any] | None], R | State[Any] | None], /, **Any) -> Any | State[Any] | None"  [arg-type]
- src/prefect/cli/shell.py:105: error: Incompatible types in assignment (expression has type "list[Any]", variable has type "Callable[[object, VarArg(object), DefaultNamedArg(bool | tuple[type[BaseException], BaseException, TracebackType | None] | tuple[None, None, None] | BaseException | None, 'exc_info'), DefaultNamedArg(bool, 'stack_info'), DefaultNamedArg(int, 'stacklevel'), DefaultNamedArg(Mapping[str, object] | None, 'extra')], None]")  [assignment]
+ src/prefect/cli/shell.py:105: error: Incompatible types in assignment (expression has type "list[Any]", variable has type "def info(self, msg: object, *args: object, exc_info: bool | tuple[type[BaseException], BaseException, TracebackType | None] | tuple[None, None, None] | BaseException | None = ..., stack_info: bool = ..., stacklevel: int = ..., extra: Mapping[str, object] | None = ...) -> None")  [assignment]

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_decorators.py:201: error: Incompatible return value type (got "Callable[[VarArg(Any), KwArg(Any)], ReturnType] | Any | property", expected "PydanticDescriptorProxy[ReturnType]")  [return-value]
+ pydantic/_internal/_decorators.py:201: error: Incompatible return value type (got "def (*Any, **Any) -> ReturnType | Any | property", expected "PydanticDescriptorProxy[ReturnType]")  [return-value]
- pydantic/_internal/_generate_schema.py:614: error: Argument 1 to "partial" has incompatible type "Callable[[Callable[[Any], Any], Mapping[str, Any], DefaultNamedArg(str | None, 'ref'), DefaultNamedArg(Mapping[str, Any] | None, 'json_schema_input_schema'), DefaultNamedArg(dict[str, Any] | None, 'metadata'), DefaultNamedArg(SimpleSerSchema | PlainSerializerFunctionSerSchema | WrapSerializerFunctionSerSchema | FormatSerSchema | ToStringSerSchema | ModelSerSchema | None, 'serialization')], AfterValidatorFunctionSchema]"; expected "Callable[..., WrapValidatorFunctionSchema]"  [arg-type]
+ pydantic/_internal/_generate_schema.py:614: error: Argument 1 to "partial" has incompatible type "def no_info_after_validator_function(function: Callable[[Any], Any], schema: Mapping[str, Any], *, ref: str | None = ..., json_schema_input_schema: Mapping[str, Any] | None = ..., metadata: dict[str, Any] | None = ..., serialization: SimpleSerSchema | PlainSerializerFunctionSerSchema | WrapSerializerFunctionSerSchema | FormatSerSchema | ToStringSerSchema | ModelSerSchema | None = ...) -> AfterValidatorFunctionSchema"; expected "Callable[..., WrapValidatorFunctionSchema]"  [arg-type]
- pydantic/_internal/_model_construction.py:307: error: Incompatible types in assignment (expression has type "Callable[[Any], bool]", base class "ABCMeta" defined the type as "Callable[[Arg(Any, 'instance')], bool]")  [assignment]
+ pydantic/_internal/_model_construction.py:307: error: Incompatible types in assignment (expression has type "Callable[[Any], bool]", base class "ABCMeta" defined the type as "def __instancecheck__(cls, instance: Any) -> bool")  [assignment]
- pydantic/_internal/_model_construction.py:308: error: Incompatible types in assignment (expression has type "Callable[[type], bool]", base class "ABCMeta" defined the type as "Callable[[Arg(type, 'subclass')], bool]")  [assignment]
+ pydantic/_internal/_model_construction.py:308: error: Incompatible types in assignment (expression has type "Callable[[type], bool]", base class "ABCMeta" defined the type as "def __subclasscheck__(cls, subclass: type) -> bool")  [assignment]
- pydantic/main.py:260: error: "Callable[[BaseModel, KwArg(Any)], None]" has no attribute "__pydantic_base_init__"  [attr-defined]
+ pydantic/main.py:260: error: "def __init__(BaseModel, /, **data: Any) -> None" has no attribute "__pydantic_base_init__"  [attr-defined]
- pydantic/root_model.py:70: error: "Callable[[RootModel[RootModelRootType], RootModelRootType, KwArg(Any)], None]" has no attribute "__pydantic_base_init__"  [attr-defined]
+ pydantic/root_model.py:70: error: "def __init__(RootModel[RootModelRootType], /, root: RootModelRootType = ..., **data: Any) -> None" has no attribute "__pydantic_base_init__"  [attr-defined]
- pydantic/_internal/_validate_call.py:126: error: Incompatible types in assignment (expression has type "Callable[[Arg(Any, 'input'), DefaultNamedArg(bool | None, 'strict'), DefaultNamedArg(Literal['allow', 'forbid', 'ignore'] | None, 'extra'), DefaultNamedArg(bool | None, 'from_attributes'), DefaultNamedArg(Any | None, 'context'), DefaultNamedArg(Any | None, 'self_instance'), DefaultNamedArg(Literal['off', 'on', 'trailing-strings'] | bool, 'allow_partial'), DefaultNamedArg(bool | None, 'by_alias'), DefaultNamedArg(bool | None, 'by_name')], Any]", variable has type "Callable[[Arg(Awaitable[Any], 'aw')], Coroutine[Any, Any, None]]")  [assignment]
+ pydantic/_internal/_validate_call.py:126: error: Incompatible types in assignment (expression has type "def validate_python(self, input: Any, *, strict: bool | None = ..., extra: Literal['allow', 'forbid', 'ignore'] | None = ..., from_attributes: bool | None = ..., context: Any | None = ..., self_instance: Any | None = ..., allow_partial: Literal['off', 'on', 'trailing-strings'] | bool = ..., by_alias: bool | None = ..., by_name: bool | None = ...) -> Any", variable has type "def return_val_wrapper(aw: Awaitable[Any]) -> Coroutine[Any, Any, None]")  [assignment]

colour (https://github.com/colour-science/colour)
- colour/temperature/krystek1985.py:115: note:     def [_Float1DT: ndarray[tuple[int], dtype[float64]]] minimize(fun: Callable[[_Float1DT, VarArg(Any), KwArg(Any)], _Float1DT], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], args: tuple[object, ...] = ..., method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None = ..., jac: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | Literal['2-point', '3-point', 'cs'] | Literal[False] | numpy.bool[Literal[False]] | Literal[0] | None = ..., hess: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: Callable[[ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult
+ colour/temperature/krystek1985.py:115: note:     def [_Float1DT: ndarray[tuple[int], dtype[float64]]] minimize(fun: def (_Float1DT, /, *Any, **Any) -> _Float1DT, x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], args: tuple[object, ...] = ..., method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None = ..., jac: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Literal['2-point', '3-point', 'cs'] | Literal[False] | numpy.bool[Literal[False]] | Literal[0] | None = ..., hess: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: def (ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult
- colour/temperature/krystek1985.py:115: note:     def minimize(fun: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None = ..., jac: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | Literal['2-point', '3-point', 'cs'] | Literal[False] | numpy.bool[Literal[False]] | Literal[0] | None = ..., hess: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: Callable[[ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult
+ colour/temperature/krystek1985.py:115: note:     def minimize(fun: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None = ..., jac: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Literal['2-point', '3-point', 'cs'] | Literal[False] | numpy.bool[Literal[False]] | Literal[0] | None = ..., hess: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: def (ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult
- colour/temperature/krystek1985.py:115: note:     def minimize(fun: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...], method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None, jac: Literal[True] | numpy.bool[Literal[True]] | Literal[1], hess: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: Callable[[ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult
+ colour/temperature/krystek1985.py:115: note:     def minimize(fun: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...], method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None, jac: Literal[True] | numpy.bool[Literal[True]] | Literal[1], hess: def (ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: def (ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], /, *Any, **Any) -> _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult
- colour/temperature/krystek1985.py:115: note:     def minimize(fun: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]], x0: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]], args: tuple[object, ...] = ..., method: Literal['Nelder-Mead', 'nelder-mead', 'Powell', 'powell', 'CG', 'cg', 'BFGS', 'bfgs', 'Newton-CG', 'newton-cg', 'L-BFGS-B', 'l-bfgs-b', 'TNC', 'tnc', 'COBYLA', 'cobyla', 'COBYQA', 'cobyqa', 'SLSQP', 'slsqp', 'Trust-Constr', 'trust-constr', 'Dogleg', 'dogleg', 'Trust-NCG', 'trust-ncg', 'Trust-Exact', 'trust-exact', 'Trust-Krylov', 'trust-krylov'] | _MinimizeMethodFun | None = ..., *, jac: Literal[True] | numpy.bool[Literal[True]] | Literal[1], hess: Callable[[ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[_CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]]] | Literal['2-point', '3-point', 'cs'] | HessianUpdateStrategy | None = ..., hessp: Callable[[ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]], VarArg(Any), KwArg(Any)], _CanArrayND[floating[Any] | integer[Any] | numpy.bool[builtins.bool]] | Sequence[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool]]] | None = ..., bounds: Sequence[tuple[float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None, float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None]] | Bounds[tuple[Any, ...], float64] | None = ..., constraints: LinearConstraint | NonlinearConstraint | _ConstraintDict | Sequence[LinearConstraint | NonlinearConstraint | _ConstraintDict] = ..., tol: float | floating[Any] | integer[Any] | numpy.bool[builtins.bool] | None = ..., callback: _CallbackResult | _CallbackVector | None = ..., options: _MinimizeOptions | None = ...) -> OptimizeResult

... (truncated 59 lines) ...

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/commands/slash.py:268: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:268: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:268: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "Callable[[MessageContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:268: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "def (MessageContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:377: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:377: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:377: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "Callable[[MessageContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:377: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "def (MessageContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1277: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1277: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1277: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "Callable[[MessageContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1277: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "def (MessageContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1331: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1331: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1331: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "Callable[[MessageContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1331: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "def (MessageContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1525: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1525: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1525: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "Callable[[MessageContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1525: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "def (MessageContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1543: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1543: error: Type argument "_SlashCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:1543: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "Callable[[MessageContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/slash.py:1543: error: Type argument "_SlashCallbackSigT" of "MessageCommand" must be a subtype of "def (MessageContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/slash.py:3222: error: Incompatible types in assignment (expression has type "Callable[[AutocompleteContext, float, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]] | None", variable has type "Callable[[AutocompleteContext, str, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]] | None")  [assignment]
- tanjun/commands/slash.py:3225: error: Incompatible types in assignment (expression has type "Callable[[AutocompleteContext, int, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]] | None", variable has type "Callable[[AutocompleteContext, str, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]] | None")  [assignment]
+ tanjun/commands/slash.py:3222: error: Incompatible types in assignment (expression has type "def (AutocompleteContext, float, /, *Any, **Any) -> Coroutine[Any, Any, None] | None", variable has type "def (AutocompleteContext, str, /, *Any, **Any) -> Coroutine[Any, Any, None] | None")  [assignment]
+ tanjun/commands/slash.py:3225: error: Incompatible types in assignment (expression has type "def (AutocompleteContext, int, /, *Any, **Any) -> Coroutine[Any, Any, None] | None", variable has type "def (AutocompleteContext, str, /, *Any, **Any) -> Coroutine[Any, Any, None] | None")  [assignment]
- tanjun/commands/slash.py:3235: error: Argument 1 to "call_with_async_di" of "Context" has incompatible type "Callable[[AutocompleteContext, str, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"; expected "Callable[..., Coroutine[Any, Any, Never] | Never]"  [arg-type]
+ tanjun/commands/slash.py:3235: error: Argument 1 to "call_with_async_di" of "Context" has incompatible type "def (AutocompleteContext, str, /, *Any, **Any) -> Coroutine[Any, Any, None]"; expected "Callable[..., Coroutine[Any, Any, Never] | Never]"  [arg-type]
- tanjun/commands/message.py:78: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:78: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:78: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:78: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:105: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:105: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:105: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:105: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:128: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:128: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:128: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:128: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:162: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:162: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:162: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:162: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:199: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:199: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:199: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:199: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:209: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:209: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:209: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:209: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:395: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:395: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:395: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "Callable[[SlashContext, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:395: error: Type argument "_MessageCallbackSigT" of "SlashCommand" must be a subtype of "def (SlashContext, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]
- tanjun/commands/message.py:406: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "Callable[[MenuContext, Any, VarArg(Any), KwArg(Any)], Coroutine[Any, Any, None]]"  [type-var]
+ tanjun/commands/message.py:406: error: Type argument "_MessageCallbackSigT" of "MenuCommand" must be a subtype of "def (MenuContext, Any, /, *Any, **Any) -> Coroutine[Any, Any, None]"  [type-var]

... (truncated 161 lines) ...```

@hauntsaninja hauntsaninja merged commit 3174d3f into python:master Nov 3, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use MessageBuilder.pretty_callable in more places

2 participants