-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
chore(python): Add a lint-only Makefile
option
#14602
Conversation
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 think there's a clear distinction here, because the ruff linter also does formatting, e.g. it will autofix bad lints which will end up reformatting the code.
I don't like running pre-commit
because clippy is slow. make fmt
runs all the Python-side linting/formatting, which is great and all I need usually.
You can run mypy separately if you need to (I do that regularly if only mypy fails).
The "make fmt" and "make lint" options observe the same difference as
And if you haven't done a |
It's not clear to me when you would need to run the two commands separately? All I know is that I don't want my current |
When I want to check lint before going for pre-commit. I don't need a separate formatting step as my IDE keeps that in line automatically on code save (there's a
Will do that and revert for |
f45e8e7
to
71b9853
Compare
Makefile
option
Done 👍 |
Makefile
optionMakefile
option
More cleanly separates the linting and formatting options in theMakefile
(it was never clear to me why "fmt" would also trigger linting as they are not the same thing)Update; PR now just adds
make lint
(no change to fmt).Example