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

Function _matches_section_title

fire/docstrings.py:604–616  ·  view source on GitHub ↗

Returns whether title is a match for a specific section_title. Example: _matches_section_title('Yields', 'yield') == True Args: title: The title to check for matching. section_title: A specific known section title to check against.

(title, section_title)

Source from the content-addressed store, hash-verified

602
603
604def _matches_section_title(title, section_title):
605 """Returns whether title is a match for a specific section_title.
606
607 Example:
608 _matches_section_title('Yields', 'yield') == True
609
610 Args:
611 title: The title to check for matching.
612 section_title: A specific known section title to check against.
613 """
614 title = title.lower()
615 section_title = section_title.lower()
616 return section_title in (title, title[:-1]) # Supports plurals / some typos.
617
618
619def _matches_section(title, section):

Callers 1

_matches_sectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected