Skip to content

Commit

Permalink
MAINT: autoupdate pre-commit hooks (#35)
Browse files Browse the repository at this point in the history
* DX: activate VSCode multi-file diff editor
  https://code.visualstudio.com/updates/v1_85\#_multifile-diff-editor
  • Loading branch information
redeboer authored Dec 9, 2023
1 parent b0bc1cb commit f68f012
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 27 deletions.
7 changes: 6 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"version": "0.2",
"enableFiletypes": ["git-commit", "julia", "jupyter"],
"enableFiletypes": [
"git-commit",
"github-actions-workflow",
"julia",
"jupyter"
],
"flagWords": [
"analyse",
"colour",
Expand Down
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tasks:
- init: pyenv local 3.8
- init: pip install -e .[dev]

github:
Expand Down
44 changes: 19 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ci:
autoupdate_schedule: quarterly # already done by requirements-cron.yml
skip:
- mypy
- prettier
- pyright
- taplo

Expand All @@ -12,6 +13,17 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.9
hooks:
- id: check-dev-files
args:
- --no-notebooks
- --no-prettierrc
- --repo-name=sphinx-hep-pdgref
- --repo-title=sphinx-hep-pdgref
- id: format-setup-cfg

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down Expand Up @@ -40,19 +52,8 @@ repos:
)$
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.0
hooks:
- id: check-dev-files
args:
- --no-notebooks
- --no-prettierrc
- --repo-name=sphinx-hep-pdgref
- --repo-title=sphinx-hep-pdgref
- id: format-setup-cfg

- repo: https://github.com/psf/black
rev: 23.9.1
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black

Expand All @@ -62,12 +63,12 @@ repos:
- id: blacken-docs

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v7.3.1
rev: v8.1.1
hooks:
- id: cspell

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
name: editorconfig
Expand All @@ -87,24 +88,17 @@ repos:
- python

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.3-1
hooks:
- id: prettier

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.330
rev: v1.1.339
hooks:
- id: pyright

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- --py36-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.7
hooks:
- id: ruff
args:
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88]
Expand All @@ -34,6 +34,7 @@
"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true,
"cSpell.enabled": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"files.watcherExclude": {
"**/*_cache/**": true,
Expand All @@ -44,6 +45,7 @@
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.refresh.enabled": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
"multiDiffEditor.experimental.enabled": true,
"mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"],
"mypy-type-checker.importStrategy": "fromEnvironment",
"python.analysis.autoImportCompletions": false,
Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ dependencies:
- pip
- pip:
- -e .[dev]
variables:
PRETTIER_LEGACY_CLI: "1"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ task-tags = ["cspell"]
"PLR0913",
"PLR2004",
"S101",
"T20",
]

[tool.ruff.pydocstyle]
Expand Down

0 comments on commit f68f012

Please sign in to comment.