Example #1
0
    def load_op_handler_description(self, handler=None):
        """ Load the description from function signature of command op """
        if handler is None:

            def default_handler():
                """"""  # Use empty __doc__ property here, which is required in extract_full_summary_from_signature

            handler = default_handler
        self.apply_doc_string(handler)
        return extract_full_summary_from_signature(handler)
Example #2
0
 def default_description_loader():
     op = handler or self.get_op_handler(
         operation, operation_group=kwargs.get('operation_group'))
     self._apply_doc_string(op, kwargs)
     return extract_full_summary_from_signature(op)
Example #3
0
 def keyvault_description_loader():
     op = get_op_handler()
     self.command_loader._apply_doc_string(op, merged_kwargs)  # pylint: disable=protected-access
     return extract_full_summary_from_signature(op)
Example #4
0
 def _load_descriptions():
     return extract_full_summary_from_signature(_get_operation())
Example #5
0
 def default_description_loader():
     '''Loads handler function's description.
     '''
     op = handler or self.get_op_handler(
         operation, operation_group=kwargs.get('operation_group'))
     return extract_full_summary_from_signature(op)
Example #6
0
 def _load_descriptions():
     return extract_full_summary_from_signature(_get_operation())
Example #7
0
 def description_loader():
     return extract_full_summary_from_signature(
         context.get_op_handler(getter_op, operation_group=kwargs.get('operation_group')))
Example #8
0
 def default_description_loader():
     op = handler or self.get_op_handler(operation)
     self._apply_doc_string(op, kwargs)
     return extract_full_summary_from_signature(op)
Example #9
0
 def description_loader():
     return extract_full_summary_from_signature(context.get_op_handler(getter_op))
Example #10
0
 def test_extract_summary_no_summary(self):
     summary = extract_full_summary_from_signature(op2)
     self.assertEqual(summary, '')
Example #11
0
 def test_extract_summary(self):
     summary = extract_full_summary_from_signature(op1)
     self.assertEqual(summary, 'This is the command description.')
Example #12
0
 def description_loader():
     return extract_full_summary_from_signature(
         context.get_op_handler(getter_op))
Example #13
0
 def keyvault_description_loader():
     op = get_op_handler()
     self.command_loader._apply_doc_string(op, merged_kwargs)  # pylint: disable=protected-access
     return extract_full_summary_from_signature(op)