mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-10-24 23:44:20 +00:00
feat(linter, api-nodes): add pylint for comfy_api_nodes folder (#10157)
This commit is contained in:
25
.github/workflows/ruff.yml
vendored
25
.github/workflows/ruff.yml
vendored
@@ -21,3 +21,28 @@ jobs:
|
||||
|
||||
- name: Run Ruff
|
||||
run: 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_nodes
|
||||
|
||||
1
comfy_api_nodes/apis/__init__.py
generated
1
comfy_api_nodes/apis/__init__.py
generated
@@ -2,6 +2,7 @@
|
||||
# filename: filtered-openapi.yaml
|
||||
# timestamp: 2025-07-30T08:54:00+00:00
|
||||
|
||||
# pylint: disable
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date, datetime
|
||||
|
||||
@@ -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)}",
|
||||
)
|
||||
|
||||
@@ -52,7 +52,3 @@ class RodinResourceItem(BaseModel):
|
||||
|
||||
class Rodin3DDownloadResponse(BaseModel):
|
||||
list: List[RodinResourceItem] = Field(..., description="Source List")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user