-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: LSDV-5496: Add Ruff linter #4660
Conversation
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
Codecov ReportPatch has no changes to coverable lines. 📢 Thoughts on this report? Let us know!. |
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.
Looks great overall, just a few comments that I'd like to see addressed prior to approval!
# Conflicts: # label_studio/core/utils/db.py # label_studio/tasks/functions.py # label_studio/tasks/models.py # label_studio/users/views.py
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.
LGTM modulo resolving https://github.com/HumanSignal/label-studio/pull/4660/files#r1304986074
# Conflicts: # label_studio/core/settings/base.py # label_studio/core/utils/io.py # label_studio/core/utils/params.py
Few more conflicts accrued, but I'm also seeing a single lint failure on the current diff as well. I also noticed what seemed to be a requirements issue in some of the test runs but not all? Other than that, this looks good to go. |
# Conflicts: # label_studio/core/settings/base.py # label_studio/core/settings/label_studio.py # label_studio/core/utils/io.py # label_studio/core/utils/params.py
* feat: LSDV-5496: initial commit of default ruff autofixes and ruff configs * Add some additional import fixes * Add pre-commit-hook for pre-commit of ruff * Add ruff ignores to LS * Update ruff version and add gh action * Add noqa as ruff linter in gh actions is having issues with this line for some reason * Update Ruff GH action to only run on PR commits * Add imports in LS that are needed when importing from LSE * Add default stages to change to pre-push linting * Remove F405 noqas - will be ignored * Remove F405 noqas - will be ignored * Add ignore of F405 errors in settings file, remove unused noqas * Remove unused admin file * Add migrations ignore * Remove ruff changes from migrations and ignore F811 in tests * Remove unused file * Move to pyproject.toml * Remove migration changes that were missed in other commit * Import fixes after merge * Update python version ruff assumes to 3.8 * Use underscore to allow ruff to ignore unused variable * Update commit hook with more verbose output to devs can see when fixes are made * Ruff import fixes * Add pre-commit requirement * Update with ruff autofixes * Add ignore to get by inconsistent linting issues * Add noqa ignore to get by inconsistent linting issues * Loosen dateutil requirements to fix failing CI pytests
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
(check all that apply)
Describe the reason for change
(link to issue, supportive screenshots etc.)
What does this fix?
(if this is a bug fix)
What is the new behavior?
(if this is a breaking or feature change)
What is the current behavior?
(if this is a breaking or feature change)
What libraries were added/updated?
(list all with version changes)
Does this change affect performance?
(if so describe the impacts positive or negative)
Does this change affect security?
(if so describe the impacts positive or negative)
What alternative approaches were there?
(briefly list any if applicable)
What feature flags were used to cover this change?
(briefly list any if applicable)
Does this PR introduce a breaking change?
(check only one)
What level of testing was included in the change?
(check all that apply)
Which logical domain(s) does this change affect?
(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)