-
Notifications
You must be signed in to change notification settings - Fork 0
chore: replace black with ruff as formatter #25
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
Conversation
cb4f317 to
1dc89b2
Compare
|
@ldkv Sorry, can you rebase onto main again? I'm not sure why the GitHub diff did not show the diff to the new main. |
1dc89b2 to
f651c7c
Compare
|
@c0rychu It is normal since there is no conflict with |
|
@ldkv A test: |
It should format your example automatically. |
|
@ldkv Oh, you are right. I'm so dumb. # Makefile
fix: ## Auto-fix lint/format issues via Ruff (will modify code!)
uv run pyproject-fmt pyproject.toml
uv run ruff check --fix --ignore E501 .
uv run ruff format .
check-lint: ## Ruff lint (check only)
uv run ruff check .So, just delegate the fixing for Hope that we can replace |
|
@c0rychu You should put the format before the check, no need to ignore E501. |
|
@ldkv In any case, really appreciate your help! As you can tell, I'm still learning how to get a good code quality check pipeline and CI on GitHub. This is something I'm not familiar with and get to learn as I work on this project. Wish they can unifiy the linter and formatter in ruff, as mentioned in astral-sh/ruff#8232 |
|
There is a separate command for format check. Normally the format and linter fixes should be done before the PR by the devs. The CI only includes the checks (format + linter + type checker) to enforce that the code follow your standard, the CI shouldn't fix the code itself. |
No description provided.