diff --git a/NEWS b/NEWS index 5306bf31b..a9eb7f7ec 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/borgmatic/config/generate.py b/borgmatic/config/generate.py index e69d4354f..fd9ab65c4 100644 --- a/borgmatic/config/generate.py +++ b/borgmatic/config/generate.py @@ -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 @@ -142,7 +140,7 @@ def add_comments_to_configuration_sequence(config, schema, indent=0): ``` things: - # First key description. Added by this function. + # First key description. Added by this function. - key: foo # Second key description. Added by add_comments_to_configuration_map(). other: bar diff --git a/setup.py b/setup.py index b1e7ae410..c7a4d935f 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = '1.5.5' +VERSION = '1.5.6.dev0' setup(