style: parenthesize chained boolean operators

This commit is contained in:
Mark Paronyan 2026-09-30 20:45:43 +03:00
parent 1a495ab318
commit 7a1e79a8a0
No known key found for this signature in database
GPG Key ID: 8DC7338A87FE22F8
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ async def web_ui(file_path: str):
# which results with warnings in Firefox 66 on Windows # which results with warnings in Firefox 66 on Windows
# Ref. gns3-server#1559 # Ref. gns3-server#1559
_, ext = os.path.splitext(static) _, 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) return FileResponse(static, media_type=mimetype)

View File

@ -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("."): if filename.endswith(".tmp") or filename.endswith(".md5sum") or filename.startswith("."):
continue continue
path = os.path.join(root, filename) 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 continue
if "/lib/" in path or "/lib64/" in path: if "/lib/" in path or "/lib64/" in path:
# ignore custom IOU libraries # ignore custom IOU libraries