Skip to content

23 blocks of commented-out code, half of them in one file #728

Description

@christian-byrne

What — ERA001 finds 23 commented-out code blocks, 12 of them in comfy_cli/command/custom_nodes/command.py and 6 in comfy_cli/registry/config_parser.py.

Why it matters here — Commented-out code is worse than deleted code because it reads as intent — a future reader cannot tell whether it is a rollback waiting to happen, a reference implementation, or something someone forgot. Git already remembers it. The concentration in two files suggests two specific abandoned efforts rather than scattered debt, which makes this a quick and complete cleanup rather than an endless one.

Evidence

$ ruff check --select ERA001 --output-format concise comfy_cli | cut -d: -f1 | sort | uniq -c | sort -rn
     12 comfy_cli/command/custom_nodes/command.py
      6 comfy_cli/registry/config_parser.py
      1 comfy_cli/utils.py
      1 comfy_cli/command/run/__init__.py
      1 comfy_cli/command/nodes.py

Fix

Delete the blocks. Where one documents a real alternative approach, convert it to a prose comment saying why the alternative was rejected — that survives refactors, whereas commented code silently rots against the API around it.


Found by repo-audit during repo improvement sweep 2026-08-17. Parent: #723

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions