Skip to content

Commit

Permalink
CI: isort until ruff fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Aug 14, 2024
1 parent 60fcdb5 commit 42d26da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,28 @@ repos:
# hooks:
# - id: clang-format

# Python: Ruff linter
# Python: Ruff linter & formatter
# https://docs.astral.sh/ruff/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
hooks:
# Run the linter.
# Run the linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, jupyter]
# Run the formatter.
# Run the formatter
- id: ruff-format

# Sorts Python imports according to PEP8
# https://www.python.org/dev/peps/pep-0008/#imports
# Needed until https://github.com/astral-sh/ruff/issues/12872 is fixed
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]

# Jupyter Notebooks: clean up all cell outputs
- repo: https://github.com/roy-ht/pre-commit-jupyter
rev: v1.2.1
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ requires = [
]
build-backend = "setuptools.build_meta"

[tool.flake8]
#ignore = ['E231', 'E241']
select = ['F', 'B']

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint]
ignore = ["E402", "E501"]
select = ["E", "F", "I"]
ignore = ["E402", "E501"]

[tool.ruff.lint.isort]
known-first-party = ["amrex"]
Expand Down

0 comments on commit 42d26da

Please sign in to comment.