pydiffx.sections#
Section-related definitions.
This is mostly useful internally for diff generation and parsing.
Module Attributes
A set of all preamble sections. |
|
A set of all meta sections. |
|
A set of all content sections. |
|
A mapping of section IDs to sections that may appear next in the file. |
Classes
|
Valid section IDs in a DiffX file. |
- class pydiffx.sections.Section#
Bases:
object
Valid section IDs in a DiffX file.
- MAIN = 'diffx'#
The ID of the main DiffX section.
- MAIN_PREAMBLE = '.preamble'#
The ID of the main DiffX preamble section.
- MAIN_META = '.meta'#
The ID of the main DiffX metadata section.
- CHANGE = '.change'#
The ID of a change section.
- CHANGE_PREAMBLE = '..preamble'#
The ID of a change’s preamble section.
- CHANGE_META = '..meta'#
The ID of a change’s metadata section.
- FILE = '..file'#
The ID of a file section.
- FILE_META = '...meta'#
The ID of a file’s metadata section.
- FILE_DIFF = '...diff'#
The ID of a file’s diff section.
- pydiffx.sections.PREAMBLE_SECTIONS = {'..preamble', '.preamble'}#
A set of all preamble sections.
- pydiffx.sections.META_SECTIONS = {'...meta', '..meta', '.meta'}#
A set of all meta sections.
- pydiffx.sections.CONTENT_SECTIONS = {'...diff', '...meta', '..meta', '..preamble', '.meta', '.preamble'}#
A set of all content sections.
- pydiffx.sections.VALID_SECTION_STATES = {'...diff': {'..file', '.change'}, '...meta': {'...diff', '..file', '.change'}, '..file': {'...meta'}, '..meta': {'..file', '.change'}, '..preamble': {'..file', '..meta'}, '.change': {'..file', '..meta', '..preamble'}, '.meta': {'.change'}, '.preamble': {'.change', '.meta'}, 'diffx': {'.change', '.meta', '.preamble'}}#
A mapping of section IDs to sections that may appear next in the file.