From d4c02a8cd1a43fb748c179817c19c42210cc1396 Mon Sep 17 00:00:00 2001 From: anselor Date: Mon, 11 Dec 2023 11:18:26 -0500 Subject: [PATCH] Temporarily ignore error for Issue #1281 (#1283) --- cmd2/cmd2.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 1a58f6f8..c5c0db78 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -684,14 +684,19 @@ def _build_parser( self, parent: CommandParent, parser_builder: Optional[ - Union[argparse.ArgumentParser, Callable[[], argparse.ArgumentParser], StaticArgParseBuilder, ClassArgParseBuilder] + Union[ + argparse.ArgumentParser, + Callable[[], argparse.ArgumentParser], + StaticArgParseBuilder, + ClassArgParseBuilder, + ] ], ) -> Optional[argparse.ArgumentParser]: parser: Optional[argparse.ArgumentParser] = None if isinstance(parser_builder, staticmethod): parser = parser_builder.__func__() elif isinstance(parser_builder, classmethod): - parser = parser_builder.__func__(parent if not None else self) + parser = parser_builder.__func__(parent if not None else self) # type: ignore[arg-type] elif callable(parser_builder): parser = parser_builder() elif isinstance(parser_builder, argparse.ArgumentParser):