Merge pull request #972 from pimutils/pre-commit-ci-update-config

[pre-commit.ci] pre-commit autoupdate
This commit is contained in:
Hugo 2022-03-22 13:24:40 +01:00 committed by GitHub
commit 711eccedab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 30 deletions

View file

@ -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/.*

View file

@ -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(

View file

@ -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)

View file

@ -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,