Skip to content

Commit

Permalink
Merge pull request #423 from ESSS/migrate-to-ruff
Browse files Browse the repository at this point in the history
Migrate to ruff
  • Loading branch information
nicoddemus authored Feb 5, 2025
2 parents 4a3ad24 + a2fbd91 commit 0158017
Show file tree
Hide file tree
Showing 51 changed files with 700 additions and 922 deletions.
11 changes: 11 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# List of revisions that can be ignored with git-blame(1).
#
# See `blame.ignoreRevsFile` in git-config(1) to enable it by default, or
# use it with `--ignore-revs-file` manually with git-blame.
#
# To "install" it:
#
# git config --local blame.ignoreRevsFile .gitblameignore

# run ruff format
0b1812b80088fee1931f7f4d19046da56f662199
19 changes: 6 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@ exclude: |
default_language_version:
python: python3.10
repos:
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.4
hooks:
- id: reorder-python-imports
args:
- --application-directories=.:src
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args:
- --safe
- --quiet
language_version: python3
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,30 @@ requires = [
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.ruff]
target-version = "py310"
src = [
"src",
"tests",
]
format.docstring-code-format = true
lint.select = ['E4', 'E7', 'E9', 'F', 'I']
lint.ignore = [
"E402",
"E711",
"E712",
"E721",
"E722",
"E731",
"E741",
"F401",
"F403",
"F405",
"F507",
"F601",
"F722",
"F811",
"F821",
"F841",
]
Loading

0 comments on commit 0158017

Please sign in to comment.