Skip to content

infra: replace flake8 with ruff for linting (closes #466)#924

Merged
lmeyerov merged 3 commits intographistry:masterfrom
roli-lpci:infra/replace-flake8-with-ruff
Feb 28, 2026
Merged

infra: replace flake8 with ruff for linting (closes #466)#924
lmeyerov merged 3 commits intographistry:masterfrom
roli-lpci:infra/replace-flake8-with-ruff

Conversation

@roli-lpci
Copy link
Copy Markdown
Contributor

@roli-lpci roli-lpci commented Feb 25, 2026

Summary

  • Replace flake8 with ruff for linting, as requested in [FEA] replace flake8 with ruff #466
  • Migrate flake8 configuration to ruff.toml / pyproject.toml
  • Update CI workflows to use ruff check instead of flake8
  • All existing lint rules are preserved with equivalent ruff rule codes

Test plan

  • Verify ruff check . passes with no new violations
  • Verify CI lint step works correctly
  • Verify no remaining references to flake8 in config/CI

- Add pyproject.toml with [tool.ruff] config translating all flake8
  rules (E/W, F, C90) and ignore list from bin/flake8.sh
- Add bin/ruff.sh runner with quick syntax + full lint passes
- Update bin/lint.sh to resolve ruff (uvx > bare > python -m)
- Deprecate bin/flake8.sh as wrapper delegating to ruff.sh
- Replace flake8 with ruff>=0.8.0 in setup.py test extras
- Clean stale # noqa comments for W503/W504/E126 (not applicable in ruff)
- Update CHANGELOG.md, DEVELOP.md, and docs references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@lmeyerov lmeyerov left a comment

Choose a reason for hiding this comment

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

Thank you @roli-lpci !

I approved a ci run

Two things popped in AI review:

  - flake8 references remain in docs/internal guidance (e.g., ai/README.md, ai/prompts/LINT_TYPES_CHECK.md) and the wrapper bin/flake8.sh is still present (even if
    deprecated)

  - bin/lint.sh prefers uvx ruff, which may use an unpinned Ruff version if uvx is available. If reproducibility matters, consider forcing python -m ruff from the venv or pinning
    in CI.
  • Can you finish updating the references?

  • Unsure on the second comment. We intentionally keep lint/type checking unpinned for helping catch latest issues, though I do think it's supposed to be env conrollled.

roli-lpci and others added 2 commits February 25, 2026 15:06
- ai/README.md: update WITH_LINT description from flake8 to ruff
- ai/prompts/LINT_TYPES_CHECK.md: replace all flake8 references with ruff
- bin/ruff.sh: remove stale flake8 comment
- bin/flake8.sh: delete deprecated wrapper script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…oml comment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lmeyerov
Copy link
Copy Markdown
Contributor

ci passed in #925 , merging, thanks!

@lmeyerov lmeyerov merged commit f334109 into graphistry:master Feb 28, 2026
65 of 73 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