feat: Add comprehensive Ruff lint configuration#6214
Open
crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
Open
feat: Add comprehensive Ruff lint configuration#6214crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
crawfordxx wants to merge 1 commit intofeast-dev:masterfrom
Conversation
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
Member
|
looks like this one will require some running of the linter! |
Collaborator
yes, you are right. @crawfordxx can you address the errors? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive Ruff linting configuration to the root
pyproject.tomlas part of the migration to Ruff (refs #5788).pyproject.toml: Added[tool.ruff.lint]section with rule setsE,W,F(pycodestyle/pyflakes),I(isort), andUP(pyupgrade). Migrated ignore rules and isort config fromsdk/python/pyproject.toml. Added[tool.ruff.lint.pyupgrade]withkeep-runtime-typing = trueto avoid breaking runtime type annotations. Consolidated exclude patterns to properly referencesdk/python/feast/protosandsdk/python/feast/embedded_go/lib.sdk/python/pyproject.toml: AddedUPrule 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
ruff check sdk/python/feast/ sdk/python/tests/to verify configuration loads correctlyruff format --check sdk/python/feast/ sdk/python/tests/to verify format configpre-commit run --all-files