Skip to content

feat: Add comprehensive Ruff lint configuration#6214

Open
crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
crawfordxx:feat-migrate-to-ruff
Open

feat: Add comprehensive Ruff lint configuration#6214
crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
crawfordxx:feat-migrate-to-ruff

Conversation

@crawfordxx
Copy link
Copy Markdown

@crawfordxx crawfordxx commented Apr 1, 2026

Summary

Adds comprehensive Ruff linting configuration to the root pyproject.toml as part of the migration to Ruff (refs #5788).

  • Root pyproject.toml: Added [tool.ruff.lint] section with rule sets E, W, F (pycodestyle/pyflakes), I (isort), and UP (pyupgrade). Migrated ignore rules and isort config from sdk/python/pyproject.toml. Added [tool.ruff.lint.pyupgrade] with keep-runtime-typing = true to avoid breaking runtime type annotations. Consolidated exclude patterns to properly reference sdk/python/feast/protos and sdk/python/feast/embedded_go/lib.
  • sdk/python/pyproject.toml: Added UP rule set and pyupgrade config for consistency with root config.

The pre-commit hooks and Makefile targets already use Ruff via uv run ruff, so no changes were needed there. This PR focuses on completing the Ruff lint configuration; auto-fixing existing violations is left for a follow-up to keep the diff reviewable.

Test plan

  • Run ruff check sdk/python/feast/ sdk/python/tests/ to verify configuration loads correctly
  • Run ruff format --check sdk/python/feast/ sdk/python/tests/ to verify format config
  • Verify pre-commit hooks still work: pre-commit run --all-files
  • Confirm no regressions in CI lint job

Open with Devin

Add [tool.ruff.lint] section to root pyproject.toml with rule sets
(E, W, F for pycodestyle/pyflakes, I for isort, UP for pyupgrade)
migrated from sdk/python/pyproject.toml. Consolidate exclude patterns
to properly reference protobuf and embedded Go paths. Add pyupgrade
config with keep-runtime-typing to avoid breaking type annotations.

Also update sdk/python/pyproject.toml to include UP rules for
consistency across both config files.

Refs: feast-dev#5788
@crawfordxx crawfordxx requested a review from a team as a code owner April 1, 2026 15:23
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Collaborator

@shuchu shuchu left a comment

Choose a reason for hiding this comment

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

lgtm

@franciscojavierarceo
Copy link
Copy Markdown
Member

looks like this one will require some running of the linter!

@shuchu shuchu self-requested a review April 1, 2026 21:24
@shuchu shuchu changed the title feat: add comprehensive Ruff lint configuration feat: Add comprehensive Ruff lint configuration Apr 1, 2026
@shuchu
Copy link
Copy Markdown
Collaborator

shuchu commented Apr 1, 2026

looks like this one will require some running of the linter!

yes, you are right. @crawfordxx can you address the errors?

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.

3 participants