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

Function _matches_section

fire/docstrings.py:619–636  ·  view source on GitHub ↗

Returns whether title is a match any known title for a specific section. Example: _matches_section_title('Yields', Sections.YIELDS) == True _matches_section_title('param', Sections.Args) == True Args: title: The title to check for matching. section: A specific section to check

(title, section)

Source from the content-addressed store, hash-verified

617
618
619def _matches_section(title, section):
620 """Returns whether title is a match any known title for a specific section.
621
622 Example:
623 _matches_section_title('Yields', Sections.YIELDS) == True
624 _matches_section_title('param', Sections.Args) == True
625
626 Args:
627 title: The title to check for matching.
628 section: A specific section to check all possible titles for.
629 Returns:
630 True or False, indicating whether title is a match for the specified
631 section.
632 """
633 for section_title in SECTION_TITLES[section]:
634 if _matches_section_title(title, section_title):
635 return True
636 return False
637
638
639def _section_from_possible_title(possible_title):

Callers 1

Calls 1

_matches_section_titleFunction · 0.85

Tested by

no test coverage detected