Skip to content

Fix E402/RUF001/RUF003 lint findings (baseline cleanup) - #511

Merged
squid-protocol merged 2 commits into
squid-protocol:mainfrom
Ibrahimkhanlodhi:fix/ruff-baseline-e402-ruf001-ruf003
Jul 26, 2026
Merged

squid-protocol merged 2 commits into
squid-protocol:mainfrom
Ibrahimkhanlodhi:fix/ruff-baseline-e402-ruf001-ruf003

Conversation

@Ibrahimkhanlodhi

Copy link
Copy Markdown
Contributor

Part of #469

Fixes the four findings listed in the sub-issue:

  • gitgalaxy/metrics/signal_processor.py:30 / :31 — E402, moved the two
    gitgalaxy.standards imports to the top of the file, above the
    DirectoryGroupData class definition.
  • gitgalaxy/recorders/llm_recorder.py:375 — RUF001, added # noqa: RUF001
    since the ℹ️ character is intentional UI/output formatting (paired with ✅
    used elsewhere in the same output), not a typo.
  • gitgalaxy/standards/language_standards.py:5899 — RUF003, replaced the
    ambiguous curly apostrophe with a straight one in the comment.

Also removed these four now-resolved entries from
tests/ruff_audit_baseline.json. Verified locally with
python tests/ruff_audit.py --ci: no new findings, no regressions,
148-finding baseline confirmed clean.

- signal_processor.py: move gitgalaxy.standards imports to top of file (E402)
- llm_recorder.py: suppress RUF001 on intentional information-source emoji in output string
- language_standards.py: replace ambiguous curly apostrophe with straight quote in comment (RUF003)
- Remove the four now-resolved entries from tests/ruff_audit_baseline.json (confirmed via python tests/ruff_audit.py --ci)

Part of squid-protocol#469

Fix E402/RUF001/RUF003 lint findings (baseline cleanup)
@Ibrahimkhanlodhi
Ibrahimkhanlodhi force-pushed the fix/ruff-baseline-e402-ruf001-ruf003 branch from 6002482 to f9885fa Compare July 26, 2026 05:51
# Conflicts:
#	tests/ruff_audit_baseline.json
@squid-protocol

Copy link
Copy Markdown
Owner

Thanks for this, Ibrahim — all three fixes are the right call, and I appreciate that you actually verified the baseline locally with ruff_audit.py --ci rather than just suppressing findings blind. The noqa on the ℹ️ character in particular was the correct move, not the lazy one — you gave a real reason (it's paired with ✅ elsewhere in the same output) instead of just silencing the linter.

The conflict here wasn't anything on your end: two of my own PRs landed on main after you opened this (a core-engine test coverage sweep, and a README pass that happened to touch llm_recorder.py), which shifted line numbers in the baseline your branch had snapshotted. Since "allow edits by maintainers" was enabled, I merged main into your branch and regenerated tests/ruff_audit_baseline.json directly rather than asking you to redo it — your three source fixes are untouched, only the generated baseline file changed. Re-verified: 912 tests passing, ruff_audit.py --ci clean at the same 148-finding baseline you confirmed.

Should be green and mergeable now. Thanks for the contribution!

@squid-protocol
squid-protocol merged commit f2d6790 into squid-protocol:main Jul 26, 2026
26 checks passed
@Ibrahimkhanlodhi

Copy link
Copy Markdown
Contributor Author

Thanks for handling the baseline regen and for the detailed explanation makes sense given the timing with your other PRs. Glad the fixes landed clean. Happy to help again if anything else comes up.

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