Skip to content

Commit

Permalink
Ruff: Formatter
Browse files Browse the repository at this point in the history
Follow-up to ECP-WarpX#671
  • Loading branch information
ax3l committed Aug 14, 2024
1 parent fe12b4d commit 891e09a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ repos:
# C++ formatting
# 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
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, jupyter]
# Run the formatter
- id: ruff-format

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


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

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

[tool.ruff.lint]
# https://docs.astral.sh/ruff/
select = ["E4", "E7", "E9", "F"]
ignore = ["E402", "F405"]
select = ["E", "F", "I"]
ignore = ["E402", "E501", "F405"]

[tool.ruff.lint.isort]
known-first-party = ["amrex", "impactx"]

[tool.isort]
known_first_party = ["amrex", "impactx"]
Expand Down

0 comments on commit 891e09a

Please sign in to comment.