mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-29 12:53:02 +02:00
Code formatting (#303).
This commit is contained in:
@@ -180,9 +180,7 @@ def check_archives(
|
||||
full_command,
|
||||
# The Borg repair option triggers an interactive prompt, which won't work when output is
|
||||
# captured. And progress messes with the terminal directly.
|
||||
output_file=(
|
||||
DO_NOT_CAPTURE if check_arguments.repair or progress else None
|
||||
),
|
||||
output_file=(DO_NOT_CAPTURE if check_arguments.repair or progress else None),
|
||||
environment=environment.make_environment(config),
|
||||
working_directory=working_directory,
|
||||
borg_local_path=local_path,
|
||||
|
||||
@@ -34,7 +34,9 @@ def make_delete_command(
|
||||
+ borgmatic.borg.flags.make_flags('umask', config.get('umask'))
|
||||
+ borgmatic.borg.flags.make_flags('log-json', global_arguments.log_json)
|
||||
+ borgmatic.borg.flags.make_flags('lock-wait', config.get('lock_wait'))
|
||||
+ borgmatic.borg.flags.make_flags('list', delete_arguments.list_archives or config.get('list'))
|
||||
+ borgmatic.borg.flags.make_flags(
|
||||
'list', delete_arguments.list_archives or config.get('list')
|
||||
)
|
||||
+ (
|
||||
(('--force',) + (('--force',) if delete_arguments.force >= 2 else ()))
|
||||
if delete_arguments.force
|
||||
|
||||
@@ -56,7 +56,9 @@ def transfer_archives(
|
||||
return execute_command(
|
||||
full_command,
|
||||
output_log_level=logging.ANSWER,
|
||||
output_file=DO_NOT_CAPTURE if (transfer_arguments.progress or config.get('progress')) else None,
|
||||
output_file=(
|
||||
DO_NOT_CAPTURE if (transfer_arguments.progress or config.get('progress')) else None
|
||||
),
|
||||
environment=environment.make_environment(config),
|
||||
working_directory=borgmatic.config.paths.get_working_directory(config),
|
||||
borg_local_path=local_path,
|
||||
|
||||
@@ -38,8 +38,9 @@ def schema_to_sample_configuration(schema, source_config=None, level=0, parent_i
|
||||
|
||||
if schema_type == 'array' or (isinstance(schema_type, list) and 'array' in schema_type):
|
||||
config = ruamel.yaml.comments.CommentedSeq(
|
||||
example if schema['items'].get('type') in SCALAR_SCHEMA_TYPES else
|
||||
[
|
||||
example
|
||||
if schema['items'].get('type') in SCALAR_SCHEMA_TYPES
|
||||
else [
|
||||
schema_to_sample_configuration(
|
||||
schema['items'], source_config, level, parent_is_sequence=True
|
||||
)
|
||||
@@ -65,7 +66,9 @@ def schema_to_sample_configuration(schema, source_config=None, level=0, parent_i
|
||||
add_comments_to_configuration_object(
|
||||
config, schema, source_config, indent=indent, skip_first=parent_is_sequence
|
||||
)
|
||||
elif isinstance(schema_type, list) and all(element_schema_type in SCALAR_SCHEMA_TYPES for element_schema_type in schema_type):
|
||||
elif isinstance(schema_type, list) and all(
|
||||
element_schema_type in SCALAR_SCHEMA_TYPES for element_schema_type in schema_type
|
||||
):
|
||||
return example
|
||||
elif schema_type in SCALAR_SCHEMA_TYPES:
|
||||
return example
|
||||
|
||||
Reference in New Issue
Block a user