From 246568f149df5ffd2c0539ffd8ea4aa87e84cc34 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 06:00:17 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- vdirsyncer/cli/config.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/vdirsyncer/cli/config.py b/vdirsyncer/cli/config.py index c863f32..344ce80 100644 --- a/vdirsyncer/cli/config.py +++ b/vdirsyncer/cli/config.py @@ -107,10 +107,7 @@ class _ConfigReader: self._storages: dict[str, dict[str, str]] = {} def _parse_section( - self, - section_type: str, - name: str, - options: dict[str, Any] + self, section_type: str, name: str, options: dict[str, Any] ) -> None: validate_section_name(name, section_type) if name in self._seen_names: @@ -129,7 +126,7 @@ class _ConfigReader: raise ValueError("Unknown section type.") def parse( - self + self, ) -> tuple[dict[str, str], dict[str, dict[str, str]], dict[str, dict[str, str]]]: for section in self._parser.sections(): if " " in section: @@ -157,8 +154,7 @@ class _ConfigReader: def _parse_options( - items: list[tuple[str, str]], - section: str | None = None + items: list[tuple[str, str]], section: str | None = None ) -> Generator[tuple[str, dict[str, str]], None, None]: for key, value in items: try: @@ -172,7 +168,7 @@ class Config: self, general: dict[str, str], pairs: dict[str, dict[str, str]], - storages: dict[str, dict[str, str]] + storages: dict[str, dict[str, str]], ) -> None: self.general = general self.storages = storages @@ -258,8 +254,7 @@ class PairConfig: raise ValueError("Unknown options: {}".format(", ".join(options))) def _process_conflict_resolution_param( - self, - conflict_resolution: str | list[str] | None + self, conflict_resolution: str | list[str] | None ): if conflict_resolution in (None, "a wins", "b wins"): return conflict_resolution @@ -337,12 +332,7 @@ load_config = Config.from_filename_or_environment def _resolve_conflict_via_command( - a, - b, - command, - a_name, - b_name, - _check_call=None + a, b, command, a_name, b_name, _check_call=None ) -> Item: import shutil import tempfile