|
I'm trying to force Ruff to check and format my So far I added to [tool.ruff]
include = [
"*.py",
"*.pyi",
"*.ipynb",
"pyproject.toml",
# PyInstaller
"*.spec",
]But it only works with manual Pre-commit hook is shamelessly copied from Astral-sh repo:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.16
hooks:
- id: ruff-format
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]I guess I should add some magic |
Answered by
ntBre
Jun 16, 2026
Replies: 1 comment · 4 replies
|
This sounds like it might be a pre-commit question rather than a Ruff question, but I've used the ❯ uvx --from identify identify-cli try.spec
["file", "non-executable", "spec", "text"] |
4 replies
Answer selected by
ratijas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This sounds like it might be a pre-commit question rather than a Ruff question, but I've used the
identify-clicommand described in https://pre-commit.com/#filtering-files-with-types before to check the file type that pre-commit will detect. It looks like there is aspectype, so that might be just what you need!