Checks whether the current line is the start of a new numpy-style section. Numpy style sections are followed by a full line of hyphens, for example: Section Name ------------ Section body goes here. Args: line_info: Information about the current line. Returns: A Section
(line_info)
| 727 | |
| 728 | |
| 729 | def _numpy_section(line_info): |
| 730 | """Checks whether the current line is the start of a new numpy-style section. |
| 731 | |
| 732 | Numpy style sections are followed by a full line of hyphens, for example: |
| 733 | |
| 734 | Section Name |
| 735 | ------------ |
| 736 | Section body goes here. |
| 737 | |
| 738 | Args: |
| 739 | line_info: Information about the current line. |
| 740 | Returns: |
| 741 | A Section type if one matches, or None if no section type matches. |
| 742 | """ |
| 743 | next_line_is_hyphens = _line_is_hyphens(line_info.next.stripped) |
| 744 | if next_line_is_hyphens: |
| 745 | possible_title = line_info.remaining |
| 746 | return _section_from_possible_title(possible_title) |
| 747 | else: |
| 748 | return None |
| 749 | |
| 750 | |
| 751 | def _line_is_numpy_parameter_type(line_info): |
no test coverage detected