ty: detect unresolved references

This commit is contained in:
Andrej730
2026-07-18 20:35:10 +05:00
parent f744753726
commit b35f99e63f
99 changed files with 401 additions and 84 deletions
+4 -2
View File
@@ -26,6 +26,8 @@ def test_file_gc(args):
inst = f.createIfcPerson()
elif api in (1, 2):
inst = f.createIfcSite()
else:
assert False, api
r = weakref.ref(f)
@@ -68,9 +70,9 @@ def test_file_gc(args):
assert r()
if not file_first:
del f
del f # ty: ignore[possibly-unresolved-reference]
else:
del inst
del inst # ty: ignore[possibly-unresolved-reference]
# With both deleted we should have no longer access to the file.
assert r() is None