Skip to content

Lint: Update Ruff config#3433

Merged
AA-Turner merged 3 commits intopython:mainfrom
hugovk:update-ruff
Sep 10, 2023
Merged

Lint: Update Ruff config#3433
AA-Turner merged 3 commits intopython:mainfrom
hugovk:update-ruff

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Sep 10, 2023

I didn't get a chance to review #3429 before merge, so here are some suggestions.

https://github.com/astral-sh/ruff-pre-commit says (emphasis mine):

Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort, unless you enable autofix, in which case, Ruff's pre-commit hook should run before Black, isort, and other formatting tools, as Ruff's autofix behavior can output code changes that require reformatting.

Also only enable GitHub formatting for GitHub Actions, not the user's local console.

And also remove --diff, it prevents the formatting and annotation.


📚 Documentation preview 📚: https://pep-previews--3433.org.readthedocs.build/

@hugovk hugovk added the lint Linter-related work and linting fixes on PEPs label Sep 10, 2023
@AA-Turner
Copy link
Member

placed after other formatting tools

Thanks for the link, I wasn't aware of this!

A

@AA-Turner AA-Turner merged commit 2868fe9 into python:main Sep 10, 2023
@hugovk hugovk deleted the update-ruff branch September 10, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lint Linter-related work and linting fixes on PEPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants