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

@@ -173,8 +173,7 @@ class ZerochanTagExtractor(ZerochanExtractor):
self.posts = self.posts_api
self.session.headers["User-Agent"] = util.USERAGENT
exts = self.config("extensions")
if exts:
if exts := self.config("extensions"):
if isinstance(exts, str):
exts = exts.split(",")
self.exts = exts