def parse_docstring(docstring, errors, **options):
    writer = _DocumentPseudoWriter()
    reader = _EpydocReader(errors)  # Outputs errors to the list.
    publish_string(docstring, writer=writer, reader=reader,
                   settings_overrides={'report_level': 10000,
                                       'halt_level': 10000,
                                       'warning_stream': None})
    return MyParsedRstDocstring(writer.document)
def parse_docstring(docstring, errors, **options):
  writer = _DocumentPseudoWriter()
  reader = _EpydocReader(errors) # Outputs errors to the list.
  publish_string(docstring, writer=writer, reader=reader,
                 settings_overrides={'report_level': 10000,
                                     'halt_level': 10000,
                                     'warning_stream': None})
  return MyParsedRstDocstring(writer.document)
示例#3
0
 def __init__(self):
     # Set up the instance we'll be using to render docstrings.
     self.errors = []
     self.writer = _DocumentPseudoWriter()
     self.publisher = Publisher(_EpydocReader(self.errors),
         writer=self.writer,
         source_class=io.StringInput)
     self.publisher.set_components('standalone', 'restructuredtext',
         'pseudoxml')
     settings_overrides={
         'report_level':10000,
         'halt_level':10000,
         'warning_stream':None,
         }
     self.publisher.process_programmatic_settings(None,
         settings_overrides, None)
     self.publisher.set_destination()