Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix and enforce all ruff W rules.

comfyanonymous79eea51a1dc5
diff --git a/comfy/ldm/modules/sub_quadratic_attention.py b/comfy/ldm/modules/sub_quadratic_attention.py
index fca8d1178..21c72373f 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 5f5612521..660831f21 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",