-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style: Introduce ruff
for linting in all plugins.
#354
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
437eed1
Use ruff for linting in kedro-telemetry
merelcht a9ae1f1
Setup ruff in pre-commit
merelcht cbddb75
Run ruff on telemetry
merelcht d73dadf
Add ruff to pre-commit for telemetry
merelcht b6ba480
Add ruff setup to kedro-airflow
merelcht 9e48420
Add ruff setup to kedro-docker
merelcht f7ac287
Add ruff setup to kedro-datasets
merelcht d714fa2
Run ruff in make lint command
merelcht 7691ee4
Add ruff to test requirements
merelcht a5eb0c0
Remove all mentions of pylint
merelcht a009181
Fix linting in tensorflow dataset
merelcht b847c20
Run linting on python 3.11
merelcht c3d2397
Bump pre-commit version
merelcht a768309
Bump pre-commit version
merelcht 613b7b9
Try bump
merelcht 6750f76
Update bump
merelcht 6ef146b
Remove upperbound precommit
merelcht File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/kedro-org/kedro/blob/af2ba0ed7abaf004da45a443a0b3d37bf11dd30f/.pre-commit-config.yaml#L6C1-L14C69
Can we use the ruff pre-commit hook? this way we don't have to install
ruff
locally and ensure CI always work the same as local.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's possible to run it only for the plugin that has been changed with the pre-commit hook. @SajidAlamQB do you know if that could work? I know you put a lot of thought into this setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @merelcht is correct, the main issue is that we can't dynamically run hooks based on the specific plugin environment on the CI. The setup will trigger all the defined ruff linting hooks on all plugins, regardless of which plugin has changes.
A workaround would be to create a script that checks for changed plugins, and then conditionally executes ruff on those plugins.