We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2829a9c commit 72ca7bdCopy full SHA for 72ca7bd
1 file changed
cmd2/cmd2.py
@@ -944,7 +944,8 @@ def _build_parser(
944
elif isinstance(parser_source, classmethod):
945
parser = parser_source.__func__(owner.__class__)
946
else:
947
- # Inspect the signature to determine if this factory expects a class argument.
+ # Following the ParserSource definition, any function with parameters
948
+ # is assumed to be a one-argument factory expecting the owner's class.
949
builder_sig = inspect.signature(parser_source)
950
951
if builder_sig.parameters:
0 commit comments