From 01fa614b6b58e1ae5d72d3e92b830171de82a339 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Fri, 29 Aug 2025 09:55:55 +0200 Subject: [PATCH] Fix line which are too long --- vdirsyncer/cli/tasks.py | 4 ++-- vdirsyncer/cli/utils.py | 6 +++--- vdirsyncer/http.py | 3 ++- vdirsyncer/storage/base.py | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/vdirsyncer/cli/tasks.py b/vdirsyncer/cli/tasks.py index 7ab1c0b..82829de 100644 --- a/vdirsyncer/cli/tasks.py +++ b/vdirsyncer/cli/tasks.py @@ -36,8 +36,8 @@ async def prepare_pair(pair_name, collections, config, *, connector): config_a, config_b = all_collections[collection_name] except KeyError: raise exceptions.UserError( - f"Pair {pair_name}: Collection {json.dumps(collection_name)} not found. These are the " - f"configured collections:\n{list(all_collections)}" + f"Pair {pair_name}: Collection {json.dumps(collection_name)} not found." + f"These are the configured collections:\n{list(all_collections)}" ) collection = CollectionConfig(pair, collection_name, config_a, config_b) diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index 51b2991..03755f3 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -79,9 +79,9 @@ def handle_cli_error(status_name=None, e=None): cli_logger.critical(e) except StorageEmpty as e: cli_logger.error( - f'{status_name}: Storage "{e.empty_storage.instance_name}" was completely emptied. If you ' - "want to delete ALL entries on BOTH sides, then use " - f"`vdirsyncer sync --force-delete {status_name}`. " + f'{status_name}: Storage "{e.empty_storage.instance_name}" was ' + "completely emptied. If you want to delete ALL entries on BOTH sides," + f"then use `vdirsyncer sync --force-delete {status_name}`. " f"Otherwise delete the files for {status_name} in your status " "directory." ) diff --git a/vdirsyncer/http.py b/vdirsyncer/http.py index 0ecd6d2..d045e17 100644 --- a/vdirsyncer/http.py +++ b/vdirsyncer/http.py @@ -104,7 +104,8 @@ def prepare_auth(auth, username, password): return DigestAuthMethod(username, password) if auth == "guess": raise exceptions.UserError( - "'Guess' authentication is not supported in this version of vdirsyncer. \n" + "'Guess' authentication is not supported in this version of " + "vdirsyncer.\n" "Please explicitly specify either 'basic' or 'digest' auth instead. \n" "See the following issue for more information: " "https://github.com/pimutils/vdirsyncer/issues/1015" diff --git a/vdirsyncer/storage/base.py b/vdirsyncer/storage/base.py index 38cb188..19f62fc 100644 --- a/vdirsyncer/storage/base.py +++ b/vdirsyncer/storage/base.py @@ -140,7 +140,8 @@ class Storage(metaclass=StorageMeta): except ValueError: pass - return f"<{self.__class__.__name__}(**{ ({x: getattr(self, x) for x in self._repr_attributes}) })>" + attrs = {x: getattr(self, x) for x in self._repr_attributes} + return f"<{self.__class__.__name__}(**{attrs})>" @abstractmethod async def list(self) -> list[tuple]: