MCPcopy Index your code
hub / github.com/google/python-fire / _section_from_possible_title

Function _section_from_possible_title

fire/docstrings.py:639–650  ·  view source on GitHub ↗

Returns a section matched by the possible title, or None if none match. Args: possible_title: A string that may be the title of a new section. Returns: A Section type if one matches, or None if no section type matches.

(possible_title)

Source from the content-addressed store, hash-verified

637
638
639def _section_from_possible_title(possible_title):
640 """Returns a section matched by the possible title, or None if none match.
641
642 Args:
643 possible_title: A string that may be the title of a new section.
644 Returns:
645 A Section type if one matches, or None if no section type matches.
646 """
647 for section in SECTION_TITLES:
648 if _matches_section(possible_title, section):
649 return section
650 return None
651
652
653def _google_section(line_info):

Callers 3

_google_sectionFunction · 0.85
_rst_sectionFunction · 0.85
_numpy_sectionFunction · 0.85

Calls 1

_matches_sectionFunction · 0.85

Tested by

no test coverage detected