Add constants for default options in DiffXWriter.

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

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.

Summary ID
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
Description From Last Updated

Mind having one arg per line instead of mixing it like this?

daviddavid
david
  1. 
      
  2. python/pydiffx/writer.py (Diff revision 1)
     
     
     
     
     
    Show all issues

    Mind having one arg per line instead of mixing it like this?

  3. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (265f832)