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'
A test case is worth a thousand words so let's just demo that.
This code:
breaks with the following stack trace:
Tested with: