astral-sh / astral-sh/ruff-pre-commit
Ruff configuration from pyproject.toml is ignored
- Dominant language
- Python
- Stars
- 2k
- Forks
- 105
- Avg merge
- 8h 36m
- Merged PRs (30d)
- 1
Description
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 file with lines that exceed this limit it is complaining about it. If I use a `ruff.toml` to configure Ruff it works as expected.
I use version 0.0.292.
My settings in `.pre-commit-config.yaml`:
```yaml
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.292
hooks:
- id: ruff
```
Ruff configuration part in my `pyproject.toml` (same is used in the `ruff.toml`)
```toml
[tool.ruff]
select = ["E"]
# Never enforce `E501` (line length violations).
ignore = ["E501"]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.