MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / _parse_directive

Method _parse_directive

tools/sampcd_processor.py:416–426  ·  view source on GitHub ↗
(
        self, docstring: str
    )

Source from the content-addressed store, hash-verified

414 _patch_float_precision(self._patch_float_precision)
415
416 def _parse_directive(
417 self, docstring: str
418 ) -> tuple[str, dict[str, Directive]]:
419 directives = {}
420 for name, directive_cls in self.directives.items():
421 docstring, direct = directive_cls[0](
422 *directive_cls[1:]
423 ).parse_directive(docstring)
424 directives[name] = direct
425
426 return docstring, directives
427
428 def convert_directive(self, docstring: str) -> str:
429 """Replace directive prefix with xdoctest"""

Callers 1

runMethod · 0.95

Calls 2

itemsMethod · 0.45
parse_directiveMethod · 0.45

Tested by

no test coverage detected