File diff 8eef1ef7f731 → 0590c952df64
gimmecert/decorators.py
Show inline comments
 
@@ -41,7 +41,7 @@ def subcommand_parser(func):
 
    having multiple code paths that deal with instantion and set-up of
 
    subcommand parsers.
 

	
 
    The registerd functions are expected to accept two arguments:
 
    The registered functions are expected to accept two arguments:
 

	
 
    - parser (ArgumentParser), instance of parent parser to which the
 
      subcommand (sub)parser belongs to.
 
@@ -50,6 +50,9 @@ def subcommand_parser(func):
 
      should instantiate a subparser through it by calling the
 
      standard subparsers.add_parser() method.
 

	
 
    The registered functions are expeceted to return the subparser
 
    itself.
 

	
 
    It is expected that each subcomand parser will set a default
 
    function to be invoked with parsed arguments by doing a call to
 
    set_defaults(func=subcommand_function).
 
@@ -65,6 +68,8 @@ def subcommand_parser(func):
 

	
 
        subparser.set_defaults(func=mysubcommand)
 

	
 
        return subparser
 

	
 
    Later on the registered setup functions should be retrieved
 
    through get_subcommand_parser_setup_functions() function.