Fix type for click.Context.exit (#2325)

click.Context.exit() calls sys.exit() and hence should be a NoReturn return type.
This commit is contained in:
Amol Bhave
2018-07-11 22:58:18 -04:00
committed by Jelle Zijlstra
parent 8d13a377d4
commit 66e9aa644b

View File

@@ -7,6 +7,7 @@ from typing import (
Iterable,
List,
Mapping,
NoReturn,
Optional,
Sequence,
Set,
@@ -120,7 +121,7 @@ class Context:
def abort(self) -> None:
...
def exit(self, code: Union[int, str] = ...) -> None:
def exit(self, code: Union[int, str] = ...) -> NoReturn:
...
def get_usage(self) -> str: