mypy: add None return types to functions that don't return a value

This commit is contained in:
Dustin Spicuzza
2022-01-02 21:30:41 -05:00
parent cd6d4f23f3
commit 9756025e2d
22 changed files with 190 additions and 189 deletions

View File

@@ -2,6 +2,7 @@ import pytest
from cxxheaderparser.lexer import Lexer
from cxxheaderparser.tokfmt import tokfmt
from cxxheaderparser.types import Token
@pytest.mark.parametrize(
@@ -34,7 +35,7 @@ from cxxheaderparser.tokfmt import tokfmt
"operator>=",
],
)
def test_tokfmt(instr):
def test_tokfmt(instr: str) -> None:
"""
Each input string is exactly what the output of tokfmt should be
"""
@@ -47,6 +48,6 @@ def test_tokfmt(instr):
if not tok:
break
toks.append(tok)
toks.append(Token(tok.value, tok.type))
assert tokfmt(toks) == instr