Skip to content

Remove comments that restate code or excuse gaps - #459

Merged
suraj-ranganath merged 1 commit into
developfrom
cursor/cleanup-code-comments-3e48
Oct 12, 2026
Merged

suraj-ranganath merged 1 commit into
developfrom
cursor/cleanup-code-comments-3e48

Conversation

@suraj-ranganath

Copy link
Copy Markdown
Member

Remove comments that restate the next line, commented-out dead code, obsolete TODO notes, and notes that excuse a shortcut. Runtime behavior is unchanged. AGENTS.md now allows comments only for non-obvious intent or EEGLAB parity, and forbids using them to justify workarounds, skipped tests, or loosened tolerances.

Rough removals: 630 restating comments, 100 section banners, 250 lines of commented-out code, and 25 workaround or stale notes. Five of those notes marked real gaps, now tracked in #454, #455, #456, #457, and #458. Assertions and tolerances were left as they are.

Kept comments include the runica sphering-matrix formula 2 * inv(sqrtm(cov(data'))), the note that MATLAB mtimes hides BLAS status warnings, the EEGLAB latency formula in eeg_lat2point, and the ICLabel max subtraction that avoids overflow. License headers and noqa / type: ignore pragmas stay.

Open in Web Open in Cursor 

Drop narration, dead commented-out code, and stale workaround notes
from src, tests, and scripts. Record the comment policy in AGENTS.md.

Co-authored-by: Suraj Ranganath <[email protected]>
@cursor

cursor Bot commented Oct 12, 2026

Copy link
Copy Markdown

🤖 Problem: narration comments, commented-out code, and notes that excused shortcuts were spread through src, tests, and scripts. Some of those notes were the only record of a real gap.

Approach: delete restating comments, section banners, dead commented-out code, and obsolete workaround notes. Leave docstrings, license headers, noqa and type: ignore pragmas, and comments that explain non-obvious intent or EEGLAB parity (indexing, rounding, MATLAB formulas, line references). Add the same rule to AGENTS.md. File #454, #455, #456, #457, and #458 for gaps whose assertions were left unchanged.

Tests: comment-only diff, so the existing suite is the check. ruff check and ruff format --check passed locally. Full pytest follows, then CI.

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@suraj-ranganath
suraj-ranganath marked this pull request as ready for review October 12, 2026 23:07

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@suraj-ranganath
suraj-ranganath merged commit b409727 into develop Oct 12, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants