mypy: Turn on return value checks
Its a shame GvR is married to "return None" https://github.com/python/mypy/issues/7511
This commit is contained in:
@@ -83,6 +83,7 @@ class Handler:
|
||||
for sc, action in self._key_shortcuts.items():
|
||||
if key_event.matches(sc):
|
||||
return action
|
||||
return None
|
||||
|
||||
def __enter__(self) -> None:
|
||||
if self._image_manager is not None:
|
||||
|
||||
@@ -132,6 +132,7 @@ class PathCompleter:
|
||||
options = self.cache[text] = tuple(find_completions(text))
|
||||
if options and state < len(options):
|
||||
return options[state]
|
||||
return None
|
||||
|
||||
def __exit__(self, *a: Any) -> bool:
|
||||
import readline
|
||||
@@ -143,6 +144,7 @@ class PathCompleter:
|
||||
def input(self) -> str:
|
||||
with self:
|
||||
return input(self.prompt)
|
||||
return ''
|
||||
|
||||
|
||||
def develop() -> None:
|
||||
|
||||
Reference in New Issue
Block a user