Skip to content

Commit 3a9a8c4

Browse files
committed
CI: isort until ruff fix
1 parent e2df7c1 commit 3a9a8c4

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,28 @@ repos:
7171
# hooks:
7272
# - id: clang-format
7373

74-
# Python: Ruff linter
74+
# Python: Ruff linter & formatter
7575
# https://docs.astral.sh/ruff/
7676
- repo: https://github.com/astral-sh/ruff-pre-commit
7777
rev: v0.5.6
7878
hooks:
79-
# Run the linter.
79+
# Run the linter
8080
- id: ruff
8181
args: [--fix, --exit-non-zero-on-fix]
8282
types_or: [python, jupyter]
83-
# Run the formatter.
83+
# Run the formatter
8484
- id: ruff-format
8585

86+
# Sorts Python imports according to PEP8
87+
# https://www.python.org/dev/peps/pep-0008/#imports
88+
# Needed until https://github.com/astral-sh/ruff/issues/12872 is fixed
89+
- repo: https://github.com/pycqa/isort
90+
rev: 5.13.2
91+
hooks:
92+
- id: isort
93+
name: isort (python)
94+
args: ["--profile", "black", "--filter-files"]
95+
8696
# Jupyter Notebooks: clean up all cell outputs
8797
- repo: https://github.com/roy-ht/pre-commit-jupyter
8898
rev: v1.2.1

pyproject.toml

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

10-
[tool.flake8]
11-
#ignore = ['E231', 'E241']
12-
select = ['F', 'B']
13-
1410
[tool.ruff.format]
1511
docstring-code-format = true
1612

1713
[tool.ruff.lint]
18-
ignore = ["E402", "E501"]
1914
select = ["E", "F", "I"]
15+
ignore = ["E402", "E501"]
2016

2117
[tool.ruff.lint.isort]
2218
known-first-party = ["amrex"]

0 commit comments

Comments
 (0)