Fix type checker errors

This commit is contained in:
James Westman 2021-10-26 23:13:31 -05:00
parent b387d4114f
commit b9068e24ab
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
7 changed files with 35 additions and 18 deletions

View file

@ -32,7 +32,7 @@ def lazy_prop(func):
return real_func
def did_you_mean(word: str, options: [str]) -> T.Optional[str]:
def did_you_mean(word: str, options: T.List[str]) -> T.Optional[str]:
if len(options) == 0:
return None
@ -67,7 +67,7 @@ def did_you_mean(word: str, options: [str]) -> T.Optional[str]:
return None
def idx_to_pos(idx: int, text: str) -> (int, int):
def idx_to_pos(idx: int, text: str) -> T.Tuple[int, int]:
if idx == 0:
return (0, 0)
sp = text[:idx].splitlines(keepends=True)