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:
Kovid Goyal
2021-10-26 22:39:14 +05:30
parent 5cb36a4632
commit 4494ddd8ff
52 changed files with 124 additions and 49 deletions

View File

@@ -333,6 +333,7 @@ class Child:
with suppress(Exception):
assert self.pid is not None
return cwd_of_process(self.pid)
return None
@property
def pid_for_cwd(self) -> Optional[int]:
@@ -349,6 +350,7 @@ class Child:
with suppress(Exception):
assert self.pid_for_cwd is not None
return cwd_of_process(self.pid_for_cwd) or None
return None
@property
def foreground_environ(self) -> Dict[str, str]: