-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomepreviewRelated to preview mode featuresRelated to preview mode features
Description
Ruff version: 0.1.7
OS: MacOS / ArchLinux / RHEL
Python: 3.11.5
I put both ruff and ruff format in my pre-commit hooks as follows:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.3.7"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
Ruff config
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".venv",
"transformertf/hysteresis"
]
line-length = 88
target-version = "py311"
preview = true
unsafe-fixes = true
[tool.ruff.lint]
# All rules can be found here: https://docs.astral.sh/ruff/rules/
select = [
"F", # pyflakes
"E", # error (pycodestyle)
"W", # warning (pycodestyle)
"I", # isort
"N", # naming (pep8)
"UP", # pyupgrade
"PLC", # convention (pylint)
"PLE", # error (pylint)
"PLW", # warning (pylint)
# "D", # docstring (pydocstyle), # not enabled by default
"PD", # pandas
"TRY", # tryceratops
"NPY", # numpy
"PERF", # perflint
"RUF", # ruff
# v flake8 v
"B",
"C4",
"FBT",
"A",
"EM",
"ISC",
"FA",
"G",
"PIE",
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SIM",
]
fixable = ["ALL"]
ignore = ["E501", "W505", "ISC001", "PD901", "PLW2901", "N812", "N806", "G004"]
[tool.ruff.format]
preview = true
When running the hooks the check --fix seems to do something that format reverts.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomepreviewRelated to preview mode featuresRelated to preview mode features

