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

Function _google_section

fire/docstrings.py:653–669  ·  view source on GitHub ↗

Checks whether the current line is the start of a new Google-style section. This docstring is a Google-style docstring. Google-style sections look like this: Section Name: section body goes here Args: line_info: Information about the current line. Returns: A Section type

(line_info)

Source from the content-addressed store, hash-verified

651
652
653def _google_section(line_info):
654 """Checks whether the current line is the start of a new Google-style section.
655
656 This docstring is a Google-style docstring. Google-style sections look like
657 this:
658
659 Section Name:
660 section body goes here
661
662 Args:
663 line_info: Information about the current line.
664 Returns:
665 A Section type if one matches, or None if no section type matches.
666 """
667 colon_index = line_info.remaining.find(':')
668 possible_title = line_info.remaining[:colon_index]
669 return _section_from_possible_title(possible_title)
670
671
672def _get_after_google_header(line_info):

Callers 1

_update_section_stateFunction · 0.85

Calls 1

Tested by

no test coverage detected