Skip to content

Commit

Permalink
chore[test]: fix a type hint (#4173)
Browse files Browse the repository at this point in the history
Description
Fix a type check warning reported by Pyre@Google, which was outdated
after code modifications.

Detail
update the return type of function fix_terminal from bool to str, since
it could be str after commit 176e7f7
  • Loading branch information
ZhipengXue97 authored Jul 26, 2024
1 parent 5067b86 commit 8931e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/functional/grammar/test_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_basic_grammar_empty():
assert len(tree.children) == 0


def fix_terminal(terminal: str) -> bool:
def fix_terminal(terminal: str) -> str:
# these throw exceptions in the grammar
for bad in ("\x00", "\\ ", "\x0c"):
terminal = terminal.replace(bad, " ")
Expand Down

0 comments on commit 8931e54

Please sign in to comment.