Make black 26.1.0 happy

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2026-02-18 15:06:53 -08:00
commit 0a4018fdab
5 changed files with 16 additions and 16 deletions

View file

@ -113,7 +113,7 @@ def triplet_sort(release, milestone, compose):
# this is a bit magic but handles "TC1.1" (old-school),
# "1.1" (new-school candidates), and "20160314.n.0" (new-
# school nightlies)
(comp, respin) = (compose.split(".")[0], compose.split(".")[-1])
comp, respin = (compose.split(".")[0], compose.split(".")[-1])
if comp.isdigit() and respin.isdigit():
compose = Decimal(".".join((comp, respin)))
return (release, milestone, compose)
@ -121,7 +121,7 @@ def triplet_sort(release, milestone, compose):
def triplet_unsort(release, milestone, compose):
"""Reverse of triplet_sort."""
(release, milestone, compose) = (str(release), str(milestone), str(compose))
release, milestone, compose = (str(release), str(milestone), str(compose))
for repl, orig in MILESTONE_PAIRS:
milestone = milestone.replace(orig, repl)
if milestone == "800":
@ -133,7 +133,7 @@ def triplet_unsort(release, milestone, compose):
pass
elif fedfind.helpers.date_check(compose.split(".")[0], fail_raise=False):
# this is slightly magic but should do for now
(comp, respin) = compose.split(".")
comp, respin = compose.split(".")
compose = f"{comp}.n.{respin}"
else:
for repl, orig in COMPOSE_PAIRS:
@ -214,7 +214,7 @@ def cid_to_event(cid):
f"{cid} looks like a production compose, but found "
"no label! Cannot determine event."
)
(milestone, compose) = ffrel.label.rsplit("-", 1)
milestone, compose = ffrel.label.rsplit("-", 1)
return (dist, release, milestone, compose)
if not typ == "nightly":

View file

@ -297,7 +297,7 @@ class Result:
for param in params:
if "=" in param:
(par, val) = param.split("=", 1)
par, val = param.split("=", 1)
namedpars[par.strip()] = val.strip()
params.remove(param)
if "bot" in namedpars and namedpars["bot"]:

View file

@ -59,7 +59,7 @@ def _check_compose(compose):
# check if we have a valid Pungi4-style identifier
try:
(date, typ, respin) = get_date_type_respin(compose)
date, typ, respin = get_date_type_respin(compose)
if date and typ and respin is not None:
if fedfind.helpers.date_check(date, fail_raise=False):
return "date"
@ -436,7 +436,7 @@ class Wiki(mwclient.Site):
method with sufficient information to avoid guessing.
"""
if cid:
(dist, release, milestone, compose) = wikitcms.helpers.cid_to_event(cid)
dist, release, milestone, compose = wikitcms.helpers.cid_to_event(cid)
if not compose or not release:
# Can't really make an educated guess without a compose
# and release, so just get the current event and return it
@ -549,7 +549,7 @@ class Wiki(mwclient.Site):
method with sufficient information to avoid guessing.
"""
if cid:
(dist, release, milestone, compose) = wikitcms.helpers.cid_to_event(cid)
dist, release, milestone, compose = wikitcms.helpers.cid_to_event(cid)
if not compose or not release:
# Can't really make an educated guess without a compose
# and release, so just get the current event and return it
@ -743,7 +743,7 @@ class Wiki(mwclient.Site):
# resdict. It's vital that the resdict contain only *one*
# entry for any given ResultRow, or else the edit will go
# squiffy.
(page, resdict) = pagedict[key]
page, resdict = pagedict[key]
try:
myrow = page.find_resultrow(
restup.testcase, restup.section, restup.testname, restup.env

View file

@ -367,7 +367,7 @@ class TestEventOther:
fakenext.side_effect = [evp1, evp2, evs, StopIteration]
rps = event.result_pages
assert len(rps) == 2
(rp1, rp2) = rps
rp1, rp2 = rps
assert isinstance(rp1, wikitcms.page.NightlyPage)
assert isinstance(rp2, wikitcms.page.NightlyPage)
assert rp1.testtype == "Base"
@ -389,7 +389,7 @@ class TestEventOther:
fakenext.side_effect = [evp1, evp2, evs, StopIteration]
rps = event.result_pages
assert len(rps) == 2
(rp1, rp2) = rps
rp1, rp2 = rps
assert isinstance(rp1, wikitcms.page.NightlyPage)
assert isinstance(rp2, wikitcms.page.NightlyPage)
assert rp1.testtype == "Base"

View file

@ -542,25 +542,25 @@ class TestWiki:
# we're going to sort the dict items for ease of testing.
items = sorted(list(resdict.items()), key=lambda x: x[0].name, reverse=True)
# first resdict entry: should be for the 'foo' test case...
(key, value) = items[0]
key, value = items[0]
assert key.name == "QA:Testcase_foo.."
# ...and value should be a 1-item list of a single 2-tuple,
# env '', result a Result instance
assert len(value) == 1
(env, res) = value[0]
env, res = value[0]
assert env == ""
assert isinstance(res, wikitcms.result.Result)
(key, value) = items[1]
key, value = items[1]
# second resdict entry: should be for the 'bar' test case
# with section name...
assert key.name == "QA:Testcase_bar.testsec."
# ... and value should be a 2-item list of 2-tuples,
# differing in the environment
assert len(value) == 2
(env1, res) = value[0]
env1, res = value[0]
assert env1 == "testenv1"
assert isinstance(res, wikitcms.result.Result)
(env1, res) = value[1]
env1, res = value[1]
assert env1 == "testenv2"
assert isinstance(res, wikitcms.result.Result)