File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -7,16 +7,12 @@ requires = [
77]
88build-backend = " setuptools.build_meta"
99
10- [tool .flake8 ]
11- # ignore = ['E231', 'E241']
12- select = [' F' , ' B' ]
13-
1410[tool .ruff .format ]
1511docstring-code-format = true
1612
1713[tool .ruff .lint ]
18- ignore = [" E402" , " E501" ]
1914select = [" E" , " F" , " I" ]
15+ ignore = [" E402" , " E501" ]
2016
2117[tool .ruff .lint .isort ]
2218known-first-party = [" amrex" ]
You can’t perform that action at this time.
0 commit comments