Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 9, 2023
1 parent a051fca commit 38e8f0d
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 52 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 -c .constraints/py3.8.txt -e .[dev]

github:
Expand Down
48 changes: 16 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ci:
skip:
- check-jsonschema
- mypy
- prettier
- pyright
- taplo
- update-json-schema
Expand All @@ -14,6 +15,19 @@ 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:
- --ci-skipped-tests=all
- --no-macos
- --no-prettierrc
- --pin-requirements=bimonthly
- --repo-name=PWA-pages
- --repo-title=PWA Pages
- id: colab-toc-visible
- id: fix-nbformat-version
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -38,29 +52,6 @@ repos:
args: ["--django"]
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.9
hooks:
- id: check-dev-files
args:
- --ci-skipped-tests=all
- --no-macos
- --no-prettierrc
- --pin-requirements=bimonthly
- --repo-name=PWA-pages
- --repo-title=PWA Pages
- id: colab-toc-visible
- id: fix-nbformat-version
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
hooks:
- id: nbqa-pyupgrade
args:
- --py37-plus
- id: nbqa-ruff
args:
- --fix

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
Expand Down Expand Up @@ -145,19 +136,12 @@ repos:
hooks:
- id: pyright

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

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: ruff
args:
- --fix
args: [--fix]
types_or: [python, pyi, jupyter]

- repo: https://github.com/ComPWA/mirrors-taplo
rev: v0.8.1
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ build:
- graphviz
jobs:
post_install:
- pip install -e .[doc] -c .constraints/py3.8.txt
- pip install -c .constraints/py3.8.txt -e .[doc]
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88]
Expand All @@ -31,6 +31,7 @@
"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true,
"cSpell.enabled": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"files.watcherExclude": {
"**/*_cache/**": true,
Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ dependencies:
- pip
- graphviz # for binder
- pip:
- |
-c .constraints/py3.8.txt
-e .[dev]
- -c .constraints/py3.8.txt -e .[dev]
variables:
PRETTIER_LEGACY_CLI: "1"
35 changes: 21 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,13 @@ format = [
]
jupyter = [
"PWA-pages[doc]",
"isort",
"jupyterlab",
"jupyterlab-code-formatter",
"jupyterlab-git",
"jupyterlab-lsp",
"jupyterlab-myst",
"python-lsp-ruff",
"python-lsp-server[rope]",
'ypy-websocket <0.8.3; python_version <"3.8.0"',
]
Expand Down Expand Up @@ -195,20 +198,6 @@ module = ["sphinx.*"]
ignore_missing_imports = true
module = ["sphinxcontrib.bibtex.*"]

[tool.nbqa.addopts]
ruff = [
"--extend-ignore=B018",
"--extend-ignore=C90",
"--extend-ignore=D",
"--extend-ignore=N806",
"--extend-ignore=N816",
"--extend-ignore=PLR09",
"--extend-ignore=PLR2004",
"--extend-ignore=PLW0602",
"--extend-ignore=PLW0603",
"--line-length=85",
]

[tool.pyright]
exclude = [
"**/.git",
Expand Down Expand Up @@ -265,6 +254,7 @@ testpaths = [
]

[tool.ruff]
extend-include = ["*.ipynb"]
extend-select = [
"A",
"B",
Expand Down Expand Up @@ -319,6 +309,22 @@ target-version = "py37"
task-tags = ["cspell"]

[tool.ruff.per-file-ignores]
"*.ipynb" = [
"B018",
"C90",
"D",
"E402",
"E703",
"N806",
"N816",
"PLR09",
"PLR2004",
"PLW0602",
"PLW0603",
"S101",
"T20",
"TCH00",
]
"docs/*" = [
"E402",
"INP001",
Expand All @@ -339,6 +345,7 @@ task-tags = ["cspell"]
"PLR0913",
"PLR2004",
"S101",
"T20",
]

[tool.ruff.pydocstyle]
Expand Down

0 comments on commit 38e8f0d

Please sign in to comment.