mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-10 06:05:26 +02:00
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:
@@ -61,7 +61,7 @@ def setup_bash_integration() -> None:
|
||||
setup_integration('bash', os.path.expanduser('~/.bashrc'))
|
||||
|
||||
|
||||
def atomic_symlink(destination: str, in_directory: str) -> str:
|
||||
def atomic_symlink(destination: str, in_directory: str) -> None:
|
||||
os.makedirs(in_directory, exist_ok=True)
|
||||
name = os.path.basename(destination)
|
||||
tmpname = os.path.join(in_directory, f'{name}-{os.getpid()}-{time.monotonic()}')
|
||||
@@ -97,6 +97,7 @@ def get_supported_shell_name(path: str) -> Optional[str]:
|
||||
name = os.path.basename(path).split('.')[0].lower()
|
||||
if name in SUPPORTED_SHELLS:
|
||||
return name
|
||||
return None
|
||||
|
||||
|
||||
@run_once
|
||||
|
||||
Reference in New Issue
Block a user