diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f326ac..09217e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: flake8 additional_dependencies: [flake8-import-order, flake8-bugbear] - repo: https://github.com/psf/black - rev: "21.12b0" + rev: "22.1.0" hooks: - id: black - repo: https://github.com/pycqa/isort @@ -23,12 +23,12 @@ repos: - id: isort name: isort (python) - repo: https://github.com/asottile/pyupgrade - rev: v2.31.0 + rev: v2.31.1 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.931" + rev: "v0.941" hooks: - id: mypy files: vdirsyncer/.* diff --git a/tests/system/cli/test_sync.py b/tests/system/cli/test_sync.py index b89f79c..d69b4c2 100644 --- a/tests/system/cli/test_sync.py +++ b/tests/system/cli/test_sync.py @@ -353,16 +353,13 @@ def test_ident_conflict(tmpdir, runner): 'error: foobar: Storage "foo" contains multiple items with the ' "same UID or even content" ) in result.output - assert ( - sorted( - [ - "one.txt" in result.output, - "two.txt" in result.output, - "three.txt" in result.output, - ] - ) - == [False, True, True] - ) + assert sorted( + [ + "one.txt" in result.output, + "two.txt" in result.output, + "three.txt" in result.output, + ] + ) == [False, True, True] @pytest.mark.parametrize( diff --git a/tests/unit/cli/test_discover.py b/tests/unit/cli/test_discover.py index 393e20a..4c24a38 100644 --- a/tests/unit/cli/test_discover.py +++ b/tests/unit/cli/test_discover.py @@ -155,18 +155,15 @@ async def test_expand_collections(shortcuts, expected): async def handle_not_found(config, collection): return missing - assert ( - sorted( - await aiostream.stream.list( - expand_collections( - shortcuts, - config_a, - config_b, - get_discovered_a, - get_discovered_b, - handle_not_found, - ) + assert sorted( + await aiostream.stream.list( + expand_collections( + shortcuts, + config_a, + config_b, + get_discovered_a, + get_discovered_b, + handle_not_found, ) ) - == sorted(expected) - ) + ) == sorted(expected) diff --git a/vdirsyncer/cli/__init__.py b/vdirsyncer/cli/__init__.py index 4e27bc5..703c1eb 100644 --- a/vdirsyncer/cli/__init__.py +++ b/vdirsyncer/cli/__init__.py @@ -126,10 +126,10 @@ def sync(ctx, collections, force_delete): from .tasks import prepare_pair from .tasks import sync_collection - async def main(collections): + async def main(collection_names): async with aiohttp.TCPConnector(limit_per_host=16) as conn: tasks = [] - for pair_name, collections in collections: + for pair_name, collections in collection_names: async for collection, config in prepare_pair( pair_name=pair_name, collections=collections, @@ -163,10 +163,10 @@ def metasync(ctx, collections): from .tasks import metasync_collection from .tasks import prepare_pair - async def main(collections): + async def main(collection_names): async with aiohttp.TCPConnector(limit_per_host=16) as conn: - for pair_name, collections in collections: + for pair_name, collections in collection_names: collections = prepare_pair( pair_name=pair_name, collections=collections,