-
Notifications
You must be signed in to change notification settings - Fork 102
Fix: Replaced Black, isort, Flake8 with Ruff and Updated dependencies #580
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
base: development
Are you sure you want to change the base?
Conversation
Signed-off-by: alikhere <[email protected]>
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.
The pull request #580 has too many files changed.
We can only review pull requests with up to 300 changed files, and this pull request has 523.
Sorry, we forgot to mention that single quote ( |
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.
You need to update GH actions as well.
Hi @alikhere, the title of PR, please capitalize the beginning of sentence. |
ok |
Signed-off-by: alikhere <[email protected]>
@hongquan Could you please review the PR. |
@alikhere The purpose of "style" GH Action is to check if submitted code conform to standard, so it should not fix or write the code. Your GH Action command is writing changes to the code: ruff check --fix . && ruff format . |
Did you test your changes in your localhost? |
sorry my bad, it should be ruff check . |
You just need to test the lint tool, you don't need to run the application, don't need to setup Docker. |
Please configure Ruff to ignore F405 error in settings.py files. |
I have tested the changes, and now ruff successfully ignores F405 in the relevant settings.py files. |
Every time you make some changes, you should show the report so that I can see and determine what should do next.
Can you do or not? |
Good idea, i can do that. |
Report1. Resolved Merge Conflicts
2. Ignored F405 in settings.pyBefore ruff was reporting F405 warnings in settings.py.After that i added the following rule to pyproject.toml[tool.ruff.lint.per-file-ignores]
"*/settings.py" = ["F405"] then ran ruff check . and verified that Ruff no longer reports F405 in settings.py. 3. Applied Ruff Formatting on Merged FilesSince merge conflicts introduced new code, I ran ruff format . All changes have been tested, and Ruff is now correctly ignoring F405 in settings.py. |
@alikhere I wonder if you are just repeating ChatGPT answer or you did put some personal thought to your work. The last comment #580 (comment) is not related to what I suggested you to do. It is just a repetition of #580 (comment). |
Apologies for the misunderstanding. I initially thought you wanted a summary of the changes I made, rather than an analysis of the ruff report itself. I will now go through the report carefully identify which issues should be ignored or fixed. |
Hello @alikhere any updates? Are you still on this? |
Yeah, After running ruff check ., I found the following issues: E501: Line too long (129 > 120) E722: Bare except block E741: Ambiguous variable names (e.g., l, O, I) I’ve shared the report with you. Could you please advise on how to proceed with fixing these issues? |
These errors are easy to fix. Please help fix.
These errors will not be quick to fix, because they require you to understand the surrounding code. Then let add them to ignore list. |
@hongquan Thanks for the feedback!
|
@alikhere Please merge "development" branch to your branch to follow up with the latest changes in "development". |
@hongquan Merged |
@alikhere Why did you add your .env file to the repository? |
@hongquan I added the .env file while setting up the project locally for testing. I just removed it and updated the PR. |
Docker build is failing. Please check. |
@alikhere Could you please resolve conflict? |
I was little busy, i will resolve and inform you. |
4a7f7ee
to
2c3e2cf
Compare
@mariobehling @hongquan Docker build fixed. |
Please help resolve conflict. |
@hongquan @mariobehling Done! |
@alikhere New conflict appears, please resolve. |
Description
This pull request simplifies the tooling in the project by replacing Black, isort, Flake8, and Pycodestyle with Ruff. The following changes have been made:
Removed the following unnecessary dependencies from the
dev
section ofpyproject.toml
as Ruff replaces them:Added Ruff as a dev dependency (
ruff = "^0.11.0"
) to thepyproject.toml
file. This consolidates both linting and formatting tasks under one tool.Updated the
pyproject.toml
file to configure Ruff:E
), warnings (W
), flake-style issues (F
), and ignored imports (I
):Updated GitHub Actions Workflow:
.github/workflows/style.yml
.No Functional Changes:
Fixes