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)
| 617 | |
| 618 | |
| 619 | def _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 | |
| 639 | def _section_from_possible_title(possible_title): |
no test coverage detected