diff --git a/README.md b/README.md index 2ffb453..1182d9d 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,10 @@ The resulting ComfyUI node extension project will automatically come with a few neat features: -- Support for Ruff linter +- Support for Ruff linter and various recommended rules - A pre-commit hook for the Ruff linter -- An `entry_point` that will ensure that ComfyUI can load your extension regardless of how it's installed - An optional `web` directory if your extension will include custom javascript - If selected, `web` will also be added to the project's `MANIFEST.in` to ensure that any non-python code in `web` will also be correctly installed - -In progress (still needs a little work): -- Testing via PyTest, including a basic integration/sanity check -- A git action that will automatically run any tests as part of Pull Requests made against your project +- Testing via PyTest (check the `tests/` directory) +- A Github Action that will automatically run any tests as part of Pull Requests made against your project +- A Github Action to publish to the Comfy Registry diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index 61b3dce..7a48ee0 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -70,6 +70,9 @@ target-version = "py39" select = [ "S102", # exec-builtin "S307", # eval-used + "W293", + "F", # 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 ] [tool.ruff.lint.flake8-quotes] diff --git a/{{cookiecutter.project_name}}/src/{{cookiecutter.project_slug}}/nodes.py b/{{cookiecutter.project_name}}/src/{{cookiecutter.project_slug}}/nodes.py index 427d9c0..5a18093 100644 --- a/{{cookiecutter.project_name}}/src/{{cookiecutter.project_slug}}/nodes.py +++ b/{{cookiecutter.project_name}}/src/{{cookiecutter.project_slug}}/nodes.py @@ -48,7 +48,7 @@ def INPUT_TYPES(s): """ return { "required": { - "image": ("IMAGE",), + "image": ("IMAGE", { "tooltip": "This is an image"}), "int_field": ("INT", { "default": 0, "min": 0, #Minimum value @@ -73,10 +73,11 @@ def INPUT_TYPES(s): RETURN_TYPES = ("IMAGE",) #RETURN_NAMES = ("image_output_name",) - + DESCRIPTION = "This is an example node" FUNCTION = "test" #OUTPUT_NODE = False + #OUTPUT_TOOLTIPS = ("",) # Tooltips for the output node CATEGORY = "Example"