simplify if statements by using walrus operators (#7671)

This commit is contained in:
Mike Fährmann
2025-07-22 18:34:38 +02:00
parent e8b2a496ba
commit a097a373a9
83 changed files with 239 additions and 466 deletions

View File

@@ -205,8 +205,7 @@ class Ao3WorkExtractor(Ao3Extractor):
}
data["language"] = util.code_to_language(data["lang"])
series = data["series"]
if series:
if series := data["series"]:
extr = text.extract_from(series)
data["series"] = {
"prev" : extr(' class="previous" href="/works/', '"'),