Пример #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)
Пример #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)
Пример #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)
Пример #4
0
 def _load_descriptions():
     return extract_full_summary_from_signature(_get_operation())
Пример #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)
Пример #6
0
 def _load_descriptions():
     return extract_full_summary_from_signature(_get_operation())
Пример #7
0
 def description_loader():
     return extract_full_summary_from_signature(
         context.get_op_handler(getter_op, operation_group=kwargs.get('operation_group')))
Пример #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)
Пример #9
0
 def description_loader():
     return extract_full_summary_from_signature(context.get_op_handler(getter_op))
Пример #10
0
 def test_extract_summary_no_summary(self):
     summary = extract_full_summary_from_signature(op2)
     self.assertEqual(summary, '')
Пример #11
0
 def test_extract_summary(self):
     summary = extract_full_summary_from_signature(op1)
     self.assertEqual(summary, 'This is the command description.')
Пример #12
0
 def description_loader():
     return extract_full_summary_from_signature(
         context.get_op_handler(getter_op))
Пример #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)