Absolutely in awe, without exaggeration, of what you've built and how it's simplified the lint-/formatting workflows in Python. I read the original project announcement and I wrote it down in my notes as a source of inspiration for turning a curious reader into a fan in as concise and effective of a way as possible.
Thank you very much 🙌🏼
What's the purpose of the change? What does it do, and why?
The purpose is to prevent ruff pre-commit hooks lint-/formatting files I've already excluded in pyproject.toml.
I thought it's necessary because pre-commit lint-/formatting files I've explicitly ignored is rather confusing. Given, of course, not knowing ruff's default behavior of lint-/formatting files passed in directly regardless of exclude/extend-exclude settings (unless --force-exclude is set).
Then, thinking "all good", after a few days, I return to project/settings.py and make an edit and commit. pre-commit fails and I'd be surprised as to why:
---
#### Suggestion
If I may give my 2 cents: I think `ruff` ignoring `exclude`/`extend-exclude` unless `force-exclude` is set is confusing and counter-intuitive. I think many folks, myself included, consider `pyproject.toml` the «source of truth» for their config and expect the tools to honor the `exclude` settings specified there. We can always override those in the cli using `--force-format` (made up flag) or similar flags if we want to bypass the «source of truth».
---
Thanks again 😊
Hi Charlie and the team! 👋🏼
Absolutely in awe, without exaggeration, of what you've built and how it's simplified the lint-/formatting workflows in Python. I read the original project announcement and I wrote it down in my notes as a source of inspiration for turning a curious reader into a fan in as concise and effective of a way as possible.
Thank you very much 🙌🏼
What's the purpose of the change? What does it do, and why?
The purpose is to prevent
ruff
pre-commit hooks lint-/formatting files I've already excluded inpyproject.toml
.I thought it's necessary because pre-commit lint-/formatting files I've explicitly ignored is rather confusing. Given, of course, not knowing
ruff
's default behavior of lint-/formatting files passed in directly regardless ofexclude
/extend-exclude
settings (unless--force-exclude
is set).How was it tested?
More like reproduction steps:
Given the following
pyproject.toml
Running
Then, thinking "all good", after a few days, I return to
project/settings.py
and make an edit and commit. pre-commit fails and I'd be surprised as to why:hook id: ruff-format
files were modified by this hook
1 file reformatted