From 7a1e79a8a099d3150b7db0bbc20e90ac6ed2b01b Mon Sep 17 00:00:00 2001 From: Mark Paronyan Date: Wed, 30 Sep 2026 20:45:43 +0300 Subject: [PATCH] style: parenthesize chained boolean operators --- gns3server/api/routes/index.py | 2 +- gns3server/utils/images.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/api/routes/index.py b/gns3server/api/routes/index.py index 23e859bc2..0c4719725 100644 --- a/gns3server/api/routes/index.py +++ b/gns3server/api/routes/index.py @@ -62,7 +62,7 @@ async def web_ui(file_path: str): # which results with warnings in Firefox 66 on Windows # Ref. gns3-server#1559 _, ext = os.path.splitext(static) - mimetype = ext == ".js" and "application/javascript" or None + mimetype = (ext == ".js" and "application/javascript") or None return FileResponse(static, media_type=mimetype) diff --git a/gns3server/utils/images.py b/gns3server/utils/images.py index 60d61ddc0..cbb5f20ca 100644 --- a/gns3server/utils/images.py +++ b/gns3server/utils/images.py @@ -170,7 +170,7 @@ async def discover_images(image_type: str, skip_image_paths: list | None = None) if filename.endswith(".tmp") or filename.endswith(".md5sum") or filename.startswith("."): continue path = os.path.join(root, filename) - if not os.path.isfile(path) or skip_image_paths and path in skip_image_paths or path in files: + if not os.path.isfile(path) or (skip_image_paths and path in skip_image_paths) or path in files: continue if "/lib/" in path or "/lib64/" in path: # ignore custom IOU libraries