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
And I suppose most things are considered "hashable":
In [1]: from abc import ABC, abstractmethod
In [2]: class ICache(ABC):
...:
...: @abstractmethod
...: def check(self) -> bool:
...: ...
...:
In [3]: from collections.abc import Hashable
In [4]: issubclass(ICache, Hashable)
Out[4]: True
My understanding is that inject allows to bind to any "hashable" for convenience but maybe there should be a more specific type for binding to an arbitrary object/value?
How can I fix typing errors when using this library?
Example:
If I specify the type like this:
cache: ICache
I get an assignment error instead. How can I resolve this please?The text was updated successfully, but these errors were encountered: