Tweak comment indentation in generated configuration file for clarity.

This commit is contained in:
Dan Helfman 2020-06-02 11:37:13 -07:00
parent adda33dc4e
commit 00033bf0a8
3 changed files with 8 additions and 7 deletions

3
NEWS
View file

@ -1,3 +1,6 @@
1.5.6.dev0
* Tweak comment indentation in generated configuration file for clarity.
1.5.5
* #314: Fix regression in support for PostgreSQL's "directory" dump format. Unlike other dump
formats, the "directory" dump format does not stream directly to/from Borg.

View file

@ -37,9 +37,7 @@ def _schema_to_sample_configuration(schema, level=0, parent_is_sequence=False):
for item_schema in schema['seq']
]
)
add_comments_to_configuration_sequence(
config, schema, indent=(level * INDENT) + SEQUENCE_INDENT
)
add_comments_to_configuration_sequence(config, schema, indent=(level * INDENT))
elif 'map' in schema:
config = yaml.comments.CommentedMap(
[
@ -86,8 +84,8 @@ def _comment_out_optional_configuration(rendered_config):
optional = False
for line in rendered_config.split('\n'):
# Upon encountering an optional configuration option, commenting out lines until the next
# blank line.
# Upon encountering an optional configuration option, comment out lines until the next blank
# line.
if line.strip().startswith('# {}'.format(COMMENTED_OUT_SENTINEL)):
optional = True
continue

View file

@ -1,6 +1,6 @@
from setuptools import find_packages, setup
VERSION = '1.5.5'
VERSION = '1.5.6.dev0'
setup(