Tags module

class rebasehelper.tags.Tag(section_index: int, section_name: str, line: int, name: str, value_span: Tuple[int, int], valid: bool, index: Optional[int] = None)[source]
class rebasehelper.tags.Tags(raw_content: rebasehelper.spec_content.SpecContent, parsed_content: rebasehelper.spec_content.SpecContent)[source]
filter(section_index: Optional[int] = None, section_name: Optional[str] = None, name: Optional[str] = None, valid: Optional[bool] = True) → Iterator[rebasehelper.tags.Tag][source]

Filters tags based on section, name or validity. Defaults to all valid tags in all sections.

Parameters:
  • section_index – If specified, includes tags only from section of this index.
  • section_name – If specified, includes tags only from sections of this name.
  • name – If specified, includes tags matching this name. Wildcards are supported.
  • valid – If specified, includes tags of this validity.
Returns:

Iterator of matching Tag objects.