MCPcopy Create free account
hub / github.com/aitjcize/Overlord / ParseMethodSubCommands

Function ParseMethodSubCommands

py/ovl.py:894–904  ·  view source on GitHub ↗

Decorator for a class using the @Command decorator. This decorator retrieve command info from each method and append it in to the SUBCOMMANDS class variable, which is later used to construct parser.

(cls)

Source from the content-addressed store, hash-verified

892
893
894def ParseMethodSubCommands(cls):
895 """Decorator for a class using the @Command decorator.
896
897 This decorator retrieve command info from each method and append it in to the
898 SUBCOMMANDS class variable, which is later used to construct parser.
899 """
900 for unused_key, method in cls.__dict__.items():
901 if hasattr(method, '__arg_attr'):
902 # pylint: disable=protected-access
903 cls.SUBCOMMANDS.append(method.__arg_attr)
904 return cls
905
906
907class FileEntry:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected