Different results between CLI and Pre-Commit #11924
Replies: 2 comments 5 replies
-
I suspect that ruff fixes the error when running the pre-commit because you configured the hook with the To compare, you can try running |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue. I use a pyproject.toml file in the root directory, which get's correctly identified if I check via how can I check / make sure both use the same settings and do not differ at all? |
Beta Was this translation helpful? Give feedback.
-
I've set up a pre-commit hook using Ruff to handle linting in my project. I've configured the hook as per the documentation:
To test this setup, I've created a script a.py with the following content:
Running ruff check from the command line gives me 3 errors:
However, when I run pre-commit, it passes without any errors. Am I missing something in my configuration?
Beta Was this translation helpful? Give feedback.
All reactions