test/stubgen: add for static checks

This commit is contained in:
2026-07-09 18:03:03 +08:00
parent 556969a054
commit 20dff6d6a7
5 changed files with 74 additions and 3 deletions
+2 -2
View File
@@ -85,11 +85,11 @@ class TestTypeRegistry:
assert reg.get_or_raise(1) is info
import pytest
with pytest.raises(KeyError):
reg.get_or_raise(999)
_ = reg.get_or_raise(999)
def test_contains(self):
reg = TypeRegistry()
info = TypeInfo(1, "Foo", "Foo", {}, None, "struct")
info: TypeInfo = TypeInfo(1, "Foo", "Foo", {}, None, "struct")
reg.register(info)
assert 1 in reg
assert 2 not in reg