mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Fix type checker errors
This commit is contained in:
parent
b387d4114f
commit
b9068e24ab
7 changed files with 35 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue