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
I have a generic interface class using typing.Generic: class MyInterface(Generic[T]).
I want to use python-interface for better conformance and checking.
However, if I add Interface as a base class: class MyInterface(Generic[T], Interface) it fails with:
...
class MyInterface(Generic[T], Interface): # Does not (currently) derive from ABC to avoid serialization issues.
File "C:\Users\adishavit\Miniconda3\envs\roomassignments\lib\site-packages\interface\interface.py", line 106, in __new__
signatures = _merge_parent_signatures(bases)
File "C:\Users\adishavit\Miniconda3\envs\roomassignments\lib\site-packages\interface\interface.py", line 91, in _merge_parent_signatures
return merge(filter(None, (getattr(b, "_signatures") for b in bases)))
File "C:\Users\adishavit\Miniconda3\envs\roomassignments\lib\site-packages\interface\functional.py", line 52, in merge
dicts = list(dicts)
File "C:\Users\adishavit\Miniconda3\envs\roomassignments\lib\site-packages\interface\interface.py", line 91, in <genexpr>
return merge(filter(None, (getattr(b, "_signatures") for b in bases)))
AttributeError: type object 'Generic' has no attribute '_signatures'
Any suggestions?
The text was updated successfully, but these errors were encountered:
I have a generic interface class using
typing.Generic
:class MyInterface(Generic[T])
.I want to use
python-interface
for better conformance and checking.However, if I add
Interface
as a base class:class MyInterface(Generic[T], Interface)
it fails with:Any suggestions?
The text was updated successfully, but these errors were encountered: