The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
feat(linter, api-nodes): add pylint for comfy_api_nodes folder (#10157)
Alexander Piskun4ffea0e86427
diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.ymlindex 4c1a02594..b24d86a6b 100644--- a/.github/workflows/ruff.yml+++ b/.github/workflows/ruff.yml@@ -21,3 +21,28 @@ jobs:- name: Run Ruffrun: ruff check .++ pylint:+ name: Run Pylint+ runs-on: ubuntu-latest++ steps:+ - name: Checkout repository+ uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v4+ with:+ python-version: '3.12'++ - name: Install requirements+ run: |+ python -m pip install --upgrade pip+ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu+ pip install -r requirements.txt++ - name: Install Pylint+ run: pip install pylint++ - name: Run Pylint+ run: pylint comfy_api_nodesdiff --git a/comfy_api_nodes/apis/__init__.py b/comfy_api_nodes/apis/__init__.pyindex 78a23db30..98f9e540d 100644--- a/comfy_api_nodes/apis/__init__.py+++ b/comfy_api_nodes/apis/__init__.py@@ -2,6 +2,7 @@# filename: filtered-openapi.yaml# timestamp: 2025-07-30T08:54:00+00:00+# pylint: disablefrom __future__ import annotationsfrom datetime import date, datetimediff --git a/comfy_api_nodes/apis/client.py b/comfy_api_nodes/apis/client.pyindex 18a694675..79de3c262 100644--- a/comfy_api_nodes/apis/client.py+++ b/comfy_api_nodes/apis/client.py@@ -535,7 +535,7 @@ class ApiClient:request_method="PUT",request_url=upload_url,response_status_code=e.status if hasattr(e, "status") else None,- response_headers=dict(e.headers) if getattr(e, "headers") else None,+ response_headers=dict(e.headers) if hasattr(e, "headers") else None,response_content=None,error_message=f"{type(e).__name__}: {str(e)}",)diff --git a/comfy_api_nodes/apis/rodin_api.py b/comfy_api_nodes/apis/rodin_api.pyindex 02cf42c29..fc26a6e73 100644--- a/comfy_api_nodes/apis/rodin_api.py+++ b/comfy_api_nodes/apis/rodin_api.py@@ -52,7 +52,3 @@ class RodinResourceItem(BaseModel):class Rodin3DDownloadResponse(BaseModel):list: List[RodinResourceItem] = Field(..., description="Source List")----diff --git a/pyproject.toml b/pyproject.tomlindex d0a76c6d0..598af4157 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -22,3 +22,57 @@ lint.select = ["F",]exclude = ["*.ipynb", "**/generated/*.pyi"]++[tool.pylint]+master.py-version = "3.9"+master.extension-pkg-allow-list = [+ "pydantic",+]+reports.output-format = "colorized"+similarities.ignore-imports = "yes"+messages_control.disable = [+ "missing-module-docstring",+ "missing-class-docstring",+ "missing-function-docstring",+ "line-too-long",+ "too-few-public-methods",+ "too-many-public-methods",+ "too-many-instance-attributes",+ "too-many-positional-arguments",+ "broad-exception-raised",+ "too-many-lines",+ "invalid-name",+ "unused-argument",+ "broad-exception-caught",+ "consider-using-with",+ "fixme",+ "too-many-statements",+ "too-many-branches",+ "too-many-locals",+ "too-many-arguments",+ "duplicate-code",+ "abstract-method",+ "superfluous-parens",+ "arguments-differ",+ "redefined-builtin",+ "unnecessary-lambda",+ "dangerous-default-value",+ # next warnings should be fixed in future+ "bad-classmethod-argument", # Class method should have 'cls' as first argument+ "wrong-import-order", # Standard imports should be placed before third party imports+ "logging-fstring-interpolation", # Use lazy % formatting in logging functions+ "ungrouped-imports",+ "unnecessary-pass",+ "unidiomatic-typecheck",+ "unnecessary-lambda-assignment",+ "bad-indentation",+ "no-else-return",+ "no-else-raise",+ "invalid-overridden-method",+ "unused-variable",+ "pointless-string-statement",+ "inconsistent-return-statements",+ "import-outside-toplevel",+ "reimported",+ "redefined-outer-name",+]