mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 13:21:11 +08:00
Update OptionParser.{error,exit} to be NoReturn (#12464)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from typing import IO, Any, AnyStr, Literal, overload
|
||||
from typing import IO, Any, AnyStr, Literal, NoReturn, overload
|
||||
|
||||
__all__ = [
|
||||
"Option",
|
||||
@@ -231,8 +231,8 @@ class OptionParser(OptionContainer):
|
||||
def check_values(self, values: Values, args: list[str]) -> tuple[Values, list[str]]: ...
|
||||
def disable_interspersed_args(self) -> None: ...
|
||||
def enable_interspersed_args(self) -> None: ...
|
||||
def error(self, msg: str) -> None: ...
|
||||
def exit(self, status: int = 0, msg: str | None = None) -> None: ...
|
||||
def error(self, msg: str) -> NoReturn: ...
|
||||
def exit(self, status: int = 0, msg: str | None = None) -> NoReturn: ...
|
||||
def expand_prog_name(self, s: str) -> str: ...
|
||||
def format_epilog(self, formatter: HelpFormatter) -> str: ...
|
||||
def format_help(self, formatter: HelpFormatter | None = None) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user