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
File "script.py", line 10, in <module>
class MySubClass(MyBaseClass):
File "script.py", line 12, in MySubClass
def my_method(self, lit : Lit) -> None:
File "<venv>/lib/python3.9/site-packages/overrides/overrides.py", line 143, in override
return _overrides(method, check_signature, check_at_runtime)
File "<venv>/lib/python3.9/site-packages/overrides/overrides.py", line 172, in _overrides
_validate_method(method, super_class, check_signature)
File "<venv>/lib/python3.9/site-packages/overrides/overrides.py", line 191, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "<venv>/lib/python3.9/site-packages/overrides/signature.py", line 104, in ensure_signature_is_compatible
ensure_all_kwargs_defined_in_sub(
File "<venv>/lib/python3.9/site-packages/overrides/signature.py", line 163, in ensure_all_kwargs_defined_in_sub
and not _issubtype(super_type_hints[name], sub_type_hints[name])
File "<venv>/lib/python3.9/site-packages/overrides/signature.py", line 42, in _issubtype
return issubtype(left, right)
File "<venv>/lib/python3.9/site-packages/overrides/typing_utils.py", line 463, in issubtype
return _is_normal_subtype(normalize(left), normalize(right), forward_refs)
File "<venv>/lib/python3.9/site-packages/overrides/typing_utils.py", line 426, in _is_normal_subtype
return _is_origin_subtype_args(left.args, right.args, forward_refs)
File "<venv>/lib/python3.9/site-packages/overrides/typing_utils.py", line 341, in _is_origin_subtype_args
and left[-1].origin is not Ellipsis
AttributeError: 'str' object has no attribute 'origin'
Tested with:
Python 3.9.6
Overrides 7.6.0
typing-extensions 4.9.0
The text was updated successfully, but these errors were encountered:
vectro
changed the title
AttributeError from overrides in conjunction with `typing.Literal' in subclassAttributeError from overrides in conjunction with typing_extensions.Literal in subclass
Jan 23, 2024
A test case is worth a thousand words so let's just demo that.
This code:
breaks with the following stack trace:
Tested with:
The text was updated successfully, but these errors were encountered: