From 79eea51a1dc51f91c58a126af456d1a07a82eee1 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 1 Jan 2025 03:08:33 -0500 Subject: [PATCH] Fix and enforce all ruff W rules. --- comfy/ldm/modules/sub_quadratic_attention.py | 6 +++--- ruff.toml | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/comfy/ldm/modules/sub_quadratic_attention.py b/comfy/ldm/modules/sub_quadratic_attention.py index fca8d117..21c72373 100644 --- a/comfy/ldm/modules/sub_quadratic_attention.py +++ b/comfy/ldm/modules/sub_quadratic_attention.py @@ -17,10 +17,10 @@ import math import logging try: - from typing import Optional, NamedTuple, List, Protocol + from typing import Optional, NamedTuple, List, Protocol except ImportError: - from typing import Optional, NamedTuple, List - from typing_extensions import Protocol + from typing import Optional, NamedTuple, List + from typing_extensions import Protocol from typing import List diff --git a/ruff.toml b/ruff.toml index 5f561252..660831f2 100644 --- a/ruff.toml +++ b/ruff.toml @@ -5,9 +5,7 @@ lint.ignore = ["ALL"] lint.select = [ "S307", # suspicious-eval-usage "T201", # print-usage - "W291", - "W292", - "W293", + "W", # The "F" series in Ruff stands for "Pyflakes" rules, which catch various Python syntax errors and undefined names. # See all rules here: https://docs.astral.sh/ruff/rules/#pyflakes-f "F",