Skip to content

Commit

Permalink
Ruff: Formatter
Browse files Browse the repository at this point in the history
Also use the formatter
  • Loading branch information
ax3l committed Aug 14, 2024
1 parent ffda9fa commit c68a418
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
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
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ 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"]

ignore = ["E402", "E501"]
select = ["E", "F", "I"]

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

0 comments on commit c68a418

Please sign in to comment.