Add constants for default options in DiffXWriter.

Review Request #11728 — Created July 17, 2021 and submitted — Latest diff uploaded

Information

DiffX
master

Reviewers

These default options are used when writing a DiffX file. The options
were previously stored as hard-coded values in function definitions, but
this meant that other parts of the codebase couldn't refer to those
defaults.

This adds DEFAULT_ENCODING and DEFAULT_PREAMBLE_INDENT to
DiffXWriter.

It also adds a new options definition, MetaFormat, for available
metadata formats. This just includes JSON right now.

Unit tests passed.

Used this with the upcoming DOM change.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Add constants for default options in DiffXWriter.
These default options are used when writing a DiffX file. The options were previously stored as hard-coded values in function definitions, but this meant that other parts of the codebase couldn't refer to those defaults. This adds `DEFAULT_ENCODING` and `DEFAULT_PREAMBLE_INDENT` to `DiffXWriter`. It also adds a new options definition, `MetaFormat`, for available metadata formats. This just includes `JSON` right now.
f65dcd4d23909643bc50de6df91bb7e146f42165 Christian Hammond
python/pydiffx/options.py
python/pydiffx/writer.py
Loading...