- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3k
Address issue #5490 - wider usage of pretty_callable for callable expressions #20128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            theodore-ando
  wants to merge
  3
  commits into
  python:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
theodore-ando:fix-5490
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +102
        
        
          −78
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
a0dd5de    to
    61ebced      
    Compare
  
    | 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:147: 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:147: 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(Optional[bool], '_sync'), KwArg(Any)], Coroutine[Any, Any, Any]].__call__" has type "Callable[[VarArg(Any), DefaultNamedArg(Optional[bool], '_sync'), KwArg(Any)], Coroutine[Any, Any, Any]]"
+ src/prefect/utilities/asyncutils.py:361: note: "_Wrapped[P, Coroutine[Any, Any, Any], [VarArg(Any), DefaultNamedArg(Optional[bool], '_sync'), KwArg(Any)], Coroutine[Any, Any, Any]].__call__" has type "def __call__(*args: Any, _sync: Optional[bool] = ..., **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], Optional[UUID], Optional[TaskRun], Optional[dict[str, Any]], Union[PrefectFuture[Any], Any, Iterable[Union[PrefectFuture[Any], Any]], None], Literal['state', 'result'], Optional[dict[str, set[RunInput]]], Optional[dict[str, Any]]], Union[R, State[Any], None]], KwArg(Any)], Union[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], Optional[UUID], Optional[TaskRun], Optional[dict[str, Any]], Union[PrefectFuture[Any], Any, Iterable[Union[PrefectFuture[Any], Any]], None], Literal['state', 'result'], Optional[dict[str, set[RunInput]]], Optional[dict[str, Any]]], Union[R, State[Any], None]], /, **Any) -> Union[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(Union[bool, Union[tuple[type[BaseException], BaseException, Optional[TracebackType]], tuple[None, None, None]], BaseException, None], 'exc_info'), DefaultNamedArg(bool, 'stack_info'), DefaultNamedArg(int, 'stacklevel'), DefaultNamedArg(Optional[Mapping[str, object]], '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: Union[bool, Union[tuple[type[BaseException], BaseException, Optional[TracebackType]], tuple[None, None, None]], BaseException, None] = ..., stack_info: bool = ..., stacklevel: int = ..., extra: Optional[Mapping[str, object]] = ...) -> 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 139 lines) ...``` | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
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]