Summary
_foo = False
def stuff():
global _foo
if not _foo:
_foo = True
Gives the following type check warning:
warning: lint:unresolved-reference: Name `_foo` used when not defined
--> test.py:5:12
|
3 | def stuff():
4 | global _foo
5 | if not _foo:
| ^^^^
6 | _foo = True
|
info: `lint:unresolved-reference` is enabled by default
Version
ty 0.0.0-alpha.7 (905a3e1 2025-05-07)