From 4b755c70344277f239f51dc78ba54016a64414e1 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:36:16 -0800 Subject: [PATCH] docopt: add exception types (#9839) --- stubs/docopt/docopt.pyi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stubs/docopt/docopt.pyi b/stubs/docopt/docopt.pyi index 6003f1526..b31fd6355 100644 --- a/stubs/docopt/docopt.pyi +++ b/stubs/docopt/docopt.pyi @@ -1,12 +1,18 @@ from _typeshed import Incomplete from collections.abc import Iterable -from typing import Any +from typing import Any, ClassVar from typing_extensions import TypeAlias __version__: str _Argv: TypeAlias = Iterable[str] | str +class DocoptLanguageError(Exception): ... + +class DocoptExit(SystemExit): + usage: ClassVar[str] + def __init__(self, message: str = "") -> None: ... + def printable_usage(doc: str) -> str: ... def docopt( doc: str, argv: _Argv | None = ..., help: bool = ..., version: Incomplete | None = ..., options_first: bool = ...