mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Use list expansion instead of concatenation
This commit is contained in:
parent
424cfc5799
commit
e3b2473383
6 changed files with 7 additions and 7 deletions
|
|
@ -54,8 +54,8 @@ def main(ical1_filename, ical2_filename):
|
|||
f"{get_summary(ical1)}...\n(full contents: {ical1_filename})\n\n"
|
||||
"or the second entry:\n"
|
||||
f"{get_summary(ical2)}...\n(full contents: {ical2_filename})?",
|
||||
*additional_args,
|
||||
]
|
||||
+ additional_args
|
||||
)
|
||||
|
||||
if r.returncode == 2:
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ async def test_list(aio_connector):
|
|||
),
|
||||
]
|
||||
|
||||
responses = ["\n".join(["BEGIN:VCALENDAR"] + items + ["END:VCALENDAR"])] * 2
|
||||
responses = ["\n".join(["BEGIN:VCALENDAR", *items, "END:VCALENDAR"])] * 2
|
||||
|
||||
def callback(url, headers, **kwargs):
|
||||
assert headers["User-Agent"].startswith("vdirsyncer/")
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ def test_repair_uids(storage, runner, repair_uids):
|
|||
else:
|
||||
opt = ["--no-repair-unsafe-uid"]
|
||||
|
||||
result = runner.invoke(["repair"] + opt + ["foo"], input="y")
|
||||
result = runner.invoke(["repair", *opt, "foo"], input="y")
|
||||
assert not result.exception
|
||||
|
||||
if repair_uids:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ _simple_split = [
|
|||
]
|
||||
|
||||
_simple_joined = "\r\n".join(
|
||||
["BEGIN:VADDRESSBOOK"] + _simple_split + ["END:VADDRESSBOOK\r\n"]
|
||||
["BEGIN:VADDRESSBOOK", *_simple_split, "END:VADDRESSBOOK\r\n"]
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ def test_split_collection_timezones():
|
|||
"END:VTIMEZONE"
|
||||
)
|
||||
|
||||
full = "\r\n".join(["BEGIN:VCALENDAR"] + items + [timezone, "END:VCALENDAR"])
|
||||
full = "\r\n".join(["BEGIN:VCALENDAR", *items, timezone, "END:VCALENDAR"])
|
||||
|
||||
given = {normalize_item(item) for item in vobject.split_collection(full)}
|
||||
expected = {
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ def _resolve_conflict_via_command(
|
|||
f.write(b.raw)
|
||||
|
||||
command[0] = expand_path(command[0])
|
||||
_check_call(command + [a_tmp, b_tmp])
|
||||
_check_call([*command, a_tmp, b_tmp])
|
||||
|
||||
with open(a_tmp) as f:
|
||||
new_a = f.read()
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ def get_storage_init_specs(cls, stop_at=object):
|
|||
else:
|
||||
superspecs = ()
|
||||
|
||||
return (spec,) + superspecs
|
||||
return (spec, *superspecs)
|
||||
|
||||
|
||||
def get_storage_init_args(cls, stop_at=object):
|
||||
|
|
|
|||
Loading…
Reference in a new issue