diff --git a/borgmatic/actions/check.py b/borgmatic/actions/check.py index 2d514ad0..be2d0c61 100644 --- a/borgmatic/actions/check.py +++ b/borgmatic/actions/check.py @@ -709,7 +709,7 @@ def run_check( **hook_context, ) - logger.info(f'Running consistency checks') + logger.info('Running consistency checks') repository_id = borgmatic.borg.check.get_repository_id( repository['path'], diff --git a/borgmatic/commands/borgmatic.py b/borgmatic/commands/borgmatic.py index 1bcdbb7f..76f16a43 100644 --- a/borgmatic/commands/borgmatic.py +++ b/borgmatic/commands/borgmatic.py @@ -176,7 +176,7 @@ def run_configuration(config_filename, config, config_paths, arguments): continue yield from log_error_records( - f'Error running actions for repository', + 'Error running actions for repository', error, ) encountered_error = error diff --git a/borgmatic/hooks/data_source/mariadb.py b/borgmatic/hooks/data_source/mariadb.py index abf7ba96..d309d9e5 100644 --- a/borgmatic/hooks/data_source/mariadb.py +++ b/borgmatic/hooks/data_source/mariadb.py @@ -49,7 +49,7 @@ def database_names_to_dump(database, extra_environment, dry_run): + ('--skip-column-names', '--batch') + ('--execute', 'show schemas') ) - logger.debug(f'Querying for "all" MariaDB databases to dump') + logger.debug('Querying for "all" MariaDB databases to dump') show_output = execute_command_and_capture_output( show_command, extra_environment=extra_environment ) diff --git a/borgmatic/hooks/data_source/mysql.py b/borgmatic/hooks/data_source/mysql.py index d302d1f5..a477d2ac 100644 --- a/borgmatic/hooks/data_source/mysql.py +++ b/borgmatic/hooks/data_source/mysql.py @@ -49,7 +49,7 @@ def database_names_to_dump(database, extra_environment, dry_run): + ('--skip-column-names', '--batch') + ('--execute', 'show schemas') ) - logger.debug(f'Querying for "all" MySQL databases to dump') + logger.debug('Querying for "all" MySQL databases to dump') show_output = execute_command_and_capture_output( show_command, extra_environment=extra_environment ) diff --git a/borgmatic/hooks/data_source/postgresql.py b/borgmatic/hooks/data_source/postgresql.py index 94a6e1f5..40c3e57b 100644 --- a/borgmatic/hooks/data_source/postgresql.py +++ b/borgmatic/hooks/data_source/postgresql.py @@ -85,7 +85,7 @@ def database_names_to_dump(database, extra_environment, dry_run): + (('--username', database['username']) if 'username' in database else ()) + (tuple(database['list_options'].split(' ')) if 'list_options' in database else ()) ) - logger.debug(f'Querying for "all" PostgreSQL databases to dump') + logger.debug('Querying for "all" PostgreSQL databases to dump') list_output = execute_command_and_capture_output( list_command, extra_environment=extra_environment ) diff --git a/tests/unit/test_logger.py b/tests/unit/test_logger.py index 6d8b0049..ef694413 100644 --- a/tests/unit/test_logger.py +++ b/tests/unit/test_logger.py @@ -254,7 +254,7 @@ def test_get_log_prefix_with_no_handlers_does_not_raise(): ) ) - assert module.get_log_prefix() == None + assert module.get_log_prefix() is None def test_get_log_prefix_with_no_formatters_does_not_raise(): @@ -268,7 +268,7 @@ def test_get_log_prefix_with_no_formatters_does_not_raise(): ) ) - assert module.get_log_prefix() == None + assert module.get_log_prefix() is None def test_get_log_prefix_with_no_prefix_does_not_raise(): @@ -284,7 +284,7 @@ def test_get_log_prefix_with_no_prefix_does_not_raise(): ) ) - assert module.get_log_prefix() == None + assert module.get_log_prefix() is None def test_set_log_prefix_updates_all_handlers():