Skip to content

Commit 1b35e66

Browse files
committed
Ruff: Formatter
Also use the formatter
1 parent b364b92 commit 1b35e66

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ repos:
7676
- repo: https://github.com/astral-sh/ruff-pre-commit
7777
rev: v0.5.6
7878
hooks:
79+
# Run the linter.
7980
- id: ruff
8081
args: [--fix, --exit-non-zero-on-fix]
8182
types_or: [python, jupyter]
83+
# Run the formatter.
84+
- id: ruff-format
8285

8386
# Jupyter Notebooks: clean up all cell outputs
8487
- repo: https://github.com/roy-ht/pre-commit-jupyter

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ requires = [
77
]
88
build-backend = "setuptools.build_meta"
99

10-
1110
[tool.flake8]
1211
#ignore = ['E231', 'E241']
1312
select = ['F', 'B']
1413

14+
[tool.ruff.format]
15+
docstring-code-format = true
1516

1617
[tool.ruff.lint]
17-
# https://docs.astral.sh/ruff/
18-
select = ["E4", "E7", "E9", "F"]
19-
ignore = ["E402"]
20-
18+
ignore = ["E402", "E501"]
19+
select = ["E", "F", "I"]
2120

2221
[tool.isort]
2322
known_first_party = ["amrex"]

0 commit comments

Comments
 (0)