Skip to content

Commit

Permalink
[test] Add function annotation case
Browse files Browse the repository at this point in the history
  • Loading branch information
ftnext committed Oct 17, 2024
1 parent ed8f58a commit 0447abd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,15 @@ def func_parameter_type_hint_attribute_case(tree: ast.AST) -> None:
checker.visit(ast.parse(code))

assert len(checker.errors) == 0

def test_not_raise_error_to_function_annotation(self) -> None:
code = dedent(
"""\
def func_parameter_annotation_case(spam: "いえーい!みんな見てる?") -> None:
...
"""
)
checker = ArgumentConcreteTypeHintChecker()
checker.visit(ast.parse(code))

assert len(checker.errors) == 0

0 comments on commit 0447abd

Please sign in to comment.