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 think that classes decorated with @type_check_only should be allowed even if they are not present in the source file (since they are not available at runtime). Using them currently results in a Class not found in source error:
foo.pyi:
fromtypingimporttype_check_onlyfromtyping_extensionsimportProtocol@type_check_onlyclassA(Protocol):
def__call__(self, u: str) ->int: ...
deff(a: A) ->int: ...
foo.py:
deff(a):
returna(u='abc')
retype outputs error: /path/to/foo.py: Class 'A' not found in source.
Hello,
I think that classes decorated with
@type_check_only
should be allowed even if they are not present in the source file (since they are not available at runtime). Using them currently results in aClass not found in source
error:foo.pyi
:foo.py
:retype
outputserror: /path/to/foo.py: Class 'A' not found in source.
I was expecting an output similar to this:
The text was updated successfully, but these errors were encountered: