@shared_task
def foo(*args:Any, **kwargs:Any)->None:
...
return None
and I am getting the following error when running mypy on it.
tasks.py:86: error: No overload variant of "shared_task" matches argument type "Callable[[VarArg(Any), KwArg(Any)], None]"
tasks.py:86: note: Possible overload variants:
tasks.py:86: note: def shared_task(*, name: str = ..., serializer: str = ..., bind: bool = ..., autoretry_for: Tuple[Type[Exception], ...] = ..., max_retries: int = ..., default_retry_delay: int = ..., acks_late: bool = ..., ignore_result: bool = ..., soft_time_limit: int = ..., time_limit: int = ..., base: None = ..., retry_kwargs: Dict[str, Any] = ..., retry_backoff: bool = ..., retry_backoff_max: int = ..., retry_jitter: bool = ..., typing: bool = ..., rate_limit: Optional[str] = ..., trail: bool = ..., send_events: bool = ..., store_errors_even_if_ignored: bool = ..., autoregister: bool = ..., track_started: bool = ..., acks_on_failure_or_timeout: bool = ..., reject_on_worker_lost: bool = ..., throws: Tuple[Type[Exception], ...] = ..., expires: Union[float, datetime, None] = ..., priority: Optional[int] = ..., resultrepr_maxsize: int = ..., request_stack: _LocalStack = ..., abstract: bool = ...) -> Callable[[Callable[..., Any]], Task]
tasks.py:86: note: def [_T <: Task] shared_task(*, name: str = ..., serializer: str = ..., bind: bool = ..., autoretry_for: Tuple[Type[Exception], ...] = ..., max_retries: int = ..., default_retry_delay: int = ..., acks_late: bool = ..., ignore_result: bool = ..., soft_time_limit: int = ..., time_limit: int = ..., base: Type[_T], retry_kwargs: Dict[str, Any] = ..., retry_backoff: bool = ..., retry_backoff_max: int = ..., retry_jitter: bool = ..., typing: bool = ..., rate_limit: Optional[str] = ..., trail: bool = ..., send_events: bool = ..., store_errors_even_if_ignored: bool = ..., autoregister: bool = ..., track_started: bool = ..., acks_on_failure_or_timeout: bool = ..., reject_on_worker_lost: bool = ..., throws: Tuple[Type[Exception], ...] = ..., expires: Union[float, datetime, None] = ..., priority: Optional[int] = ..., resultrepr_maxsize: int = ..., request_stack: _LocalStack = ..., abstract: bool = ...) -> Callable[[Callable[..., Any]], _T]
I am actually using args and kwargs, so removing those won't solve my issue.
Thanks in advance for help,