Add check for runtime use of classes or functions decorated with type_check_only
#5810
Labels
addressed in next version
Issue is fixed and will appear in next published version
enhancement request
New feature or request
The
typing.type_check_only
is a documented way to specify that a class or function within a stub file is not present at runtime and should therefore not be referenced outside of an annotation. Currently, pyright (and mypy) do not check for such uses.This is related to mypy issue python/mypy#9531.
The text was updated successfully, but these errors were encountered: