ruff-pre-commit
ruff-pre-commit copied to clipboard
A pre-commit hook for Ruff.
Hi, I'm trying to use the pre-commit hook for Ruff, but it ignores my settings from the `pyproject.toml`. I want Ruff to ignore the line-length but if I commit a...
There are various ruff lint rules that are automatically fixed by ruff format, such as extra whitespace (W291) or semicolons (E703). Hence, is it better to recommend running the formatting...
When I use this `pyproject.toml` config: ```toml [tool.ruff] select = [ "I", # isort formatting. ] ``` And this `.pre-commit-config.yaml`: ```yaml repos: - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.1.13 hooks: - id:...
When I use `ruff` with `include` from my shell, its work and ignore all directory and only apply ruff to the include directory. ``` ruff check --config 'include = ["core/others/"]'...
Currently ruff runs on `py` or `pyi` file change. But shouldn't it also run when `pyproject.toml` or `ruff.toml` is changed?
Contrary to #19, making `--force-exclude` an implicit default can cause confusing behaviors. As some CI environments might run under [paths that are excluded by default](https://docs.astral.sh/ruff/settings/#exclude) or excluded by custom configuration....
Just switching over to `ruff` from [other tools] and it has been a great experience! A minor request would be to build more pre-commit hooks for common invocations (rather than...
Since version `0.5`, ruff has dropped the `v` in its version. This mirrors that. As mentioned and done in https://github.com/astral-sh/uv-pre-commit/issues/5, `ruff` no longer has `v` in its version. This PR...
## Summary Since ruff can fix docs(trings) it can replace something like blacken-docs too, that way everything is consistent. ## Test Plan I forked the repo, added the new hook-id,...
Ruff introduced a new parameter `--range` that allows the formatter to only check the specified range. This would be useful to allow migrating from black to ruff formatting without causing...