You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just recently upgraded to 2.2.1 from 1.11 and pyright gave me lots of type hint errors.
/home/builder/archivist/confirmer.py
/home/builder/archivist/confirmer.py:84:15 - error: Argument of type "(details: dict[str, Any]) -> NoReturn" cannot be assigned to parameter "on_giveup" of type "_Handler | Iterable[_Handler]" in function "on_predicate"
Type "(details: dict[str, Any]) -> NoReturn" cannot be assigned to type "_Handler | Iterable[_Handler]"
Type "(details: dict[str, Any]) -> NoReturn" cannot be assigned to type "_Handler"
Parameter 1: type "Details" cannot be assigned to type "dict[str, Any]"
"Details" is incompatible with "dict[str, Any]"
"function" is incompatible with protocol "Iterable[_Handler]"
"_iter_" is not present (reportGeneralTypeIssues)
/home/builder/archivist/confirmer.py:122:15 - error: Argument of type "(details: dict[str, Any]) -> NoReturn" cannot be assigned to parameter "on_giveup" of type "_Handler | Iterable[_Handler]" in function "on_predicate"
Type "(details: dict[str, Any]) -> NoReturn" cannot be assigned to type "_Handler | Iterable[_Handler]"
Type "(details: dict[str, Any]) -> NoReturn" cannot be assigned to type "_Handler"
Parameter 1: type "Details" cannot be assigned to type "dict[str, Any]"
"Details" is incompatible with "dict[str, Any]"
"function" is incompatible with protocol "Iterable[_Handler]"
"_iter_" is not present (reportGeneralTypeIssues)
In order to fix this I had to import a private directory viz:
from backoff._typing import Details
Surely type hints are part of the API and should not be private ?
The text was updated successfully, but these errors were encountered:
Just recently upgraded to 2.2.1 from 1.11 and pyright gave me lots of type hint errors.
In order to fix this I had to import a private directory viz:
from backoff._typing import Details
Surely type hints are part of the API and should not be private ?
The text was updated successfully, but these errors were encountered: