Skip to content

Commit

Permalink
MAINT: autoupdate pre-commit hooks (#40)
Browse files Browse the repository at this point in the history
* DX: activate `ALL` Ruff rules
* DX: implement `.envrc` for `direnv`
* MAINT: address Ruff issues
  • Loading branch information
pre-commit-ci[bot] authored Aug 7, 2024
1 parent 96f2f2b commit 7fddc49
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 37 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
layout anaconda
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.5.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand Down Expand Up @@ -66,7 +66,7 @@ repos:
- --in-place

- repo: https://github.com/ComPWA/policy
rev: 0.3.4
rev: 0.3.18
hooks:
- id: check-dev-files
args:
Expand All @@ -76,7 +76,7 @@ repos:
- --repo-title=sphinx-hep-pdgref

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.6.1
rev: v8.13.1
hooks:
- id: cspell

Expand All @@ -101,6 +101,6 @@ repos:
- python

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.357
rev: v1.1.374
hooks:
- id: pyright
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"python.analysis.autoImportCompletions": false,
"python.analysis.inlayHints.pytestParameters": true,
"python.analysis.typeCheckingMode": "strict",
"python.terminal.activateEnvironment": false,
"python.testing.pytestArgs": ["--color=no", "--no-cov"],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
Expand Down
47 changes: 15 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -183,39 +183,11 @@ docstring-code-format = true
line-ending = "lf"

[tool.ruff.lint]
extend-select = [
"A",
"B",
"BLE",
"C4",
"C90",
"D",
"EM",
"ERA",
"FA",
"I",
"ICN",
"INP",
"ISC",
"N",
"NPY",
"PGH",
"PIE",
"PL",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"T20",
"TCH",
"TID",
"TRY",
"UP",
"YTT",
]
ignore = [
"ANN401",
"ARG001",
"COM812",
"CPY001",
"D101",
"D102",
"D103",
Expand All @@ -225,12 +197,20 @@ ignore = [
"D213",
"D407",
"D416",
"DOC",
"E501",
"FURB101",
"FURB103",
"FURB140",
"G004",
"ISC001",
"PLW1514",
"PT001",
"PTH",
"SIM108",
"UP036",
]
select = ["ALL"]
task-tags = ["cspell"]

[tool.ruff.lint.isort]
Expand All @@ -239,14 +219,17 @@ split-on-trailing-comma = false
[tool.ruff.lint.per-file-ignores]
"setup.py" = ["D100"]
"tests/*" = [
"ANN",
"D",
"FBT001",
"INP001",
"PGH001",
"PLC2701",
"PLR0913",
"PLR2004",
"PLR6301",
"S101",
"SLF001",
"T20",
]

Expand Down

0 comments on commit 7fddc49

Please sign in to comment.