Skip to content

Commit 1024ede

Browse files
committed
[test] AttributeError: 'Name' object has no attribute 'value'
1 parent 8097080 commit 1024ede

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_core.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,16 @@ def plus_one_ng(numbers: list[int], dummy) -> list[int]:
4242
checker.visit(ast.parse(code))
4343

4444
assert len(checker.errors) == 1
45+
46+
def test_KTH000_name_object_case(self):
47+
# Fix `AttributeError: 'Name' object has no attribute 'value'`
48+
code = dedent(
49+
"""\
50+
def run(code: str) -> None:
51+
...
52+
"""
53+
)
54+
checker = ArgumentConcreteTypeHintChecker()
55+
checker.visit(ast.parse(code))
56+
57+
assert len(checker.errors) == 0

0 commit comments

Comments
 (0)