Add more type annotations

This commit is contained in:
Kovid Goyal
2021-10-27 13:26:18 +05:30
parent a26f041964
commit d090db380f
11 changed files with 45 additions and 42 deletions

View File

@@ -226,7 +226,7 @@ def prettify(text: str) -> str:
def identity(x: str) -> str:
return x
def sub(m: Match) -> str:
def sub(m: 'Match[str]') -> str:
role, text = m.group(1, 2)
return role_map.get(role, identity)(text)