Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
MAINT: autoupdate pre-commit hooks (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Remco de Boer <[email protected]>
  • Loading branch information
dependabot[bot] and redeboer authored Jan 12, 2024
1 parent c6df6a5 commit 69ee2fe
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 39 deletions.
7 changes: 6 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
"redeboer",
"venv"
],
"enableFiletypes": ["git-commit", "julia", "jupyter"],
"enableFiletypes": [
"git-commit",
"github-actions-workflow",
"julia",
"jupyter"
],
"flagWords": [
"analyse",
"colour",
Expand Down
3 changes: 2 additions & 1 deletion .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 All @@ -18,7 +19,6 @@ vscode:
- eamodio.gitlens
- editorconfig.editorconfig
- esbenp.prettier-vscode
- garaioag.garaio-vscode-unwanted-recommendations
- github.vscode-github-actions
- github.vscode-pull-request-github
- ms-python.black-formatter
Expand All @@ -27,6 +27,7 @@ vscode:
- ms-python.vscode-pylance
- redhat.vscode-yaml
- ryanluker.vscode-coverage-gutters
- Soulcode.vscode-unwanted-extensions
- stkb.rewrap
- streetsidesoftware.code-spell-checker
- tamasfe.even-better-toml
Expand Down
48 changes: 21 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ci:
autoupdate_commit_msg: "ci: auto-update pre-commit hooks"
autoupdate_commit_msg: "MAINT: autoupdate pre-commit hooks"
autoupdate_schedule: monthly
skip:
- mypy
- prettier
- pyright
- taplo

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

- repo: https://github.com/ComPWA/policy
rev: 0.2.0
hooks:
- id: check-dev-files
args:
- --no-notebooks
- --no-prettierrc
- --no-pypi
- --pytest-single-threaded
- --repo-name=update-pip-constraints
- id: format-setup-cfg

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -30,20 +43,8 @@ repos:
args: ["--django"]
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.1.0
hooks:
- id: check-dev-files
args:
- --no-notebooks
- --no-prettierrc
- --no-pypi
- --pytest-single-threaded
- --repo-name=update-pip-constraints
- 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.12.1
hooks:
- id: black

Expand All @@ -53,12 +54,12 @@ repos:
- id: blacken-docs

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

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
exclude: >
Expand Down Expand Up @@ -86,24 +87,17 @@ repos:
- python

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

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.330
rev: v1.1.345
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.13
hooks:
- id: ruff
args:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"garaioag.garaio-vscode-unwanted-recommendations",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"ms-python.black-formatter",
Expand All @@ -14,6 +13,7 @@
"ms-python.vscode-pylance",
"redhat.vscode-yaml",
"ryanluker.vscode-coverage-gutters",
"Soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
Expand All @@ -24,6 +24,7 @@
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"garaioag.garaio-vscode-unwanted-recommendations",
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
Expand Down
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"[python]": {
"editor.codeActionsOnSave": {
"editor.formatOnSave": true,
"source.organizeImports": true
"editor.formatOnSave": "explicit",
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88]
Expand All @@ -29,6 +29,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 @@ -38,6 +39,7 @@
},
"git.rebaseWhenSync": 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.inlayHints.pytestParameters": true,
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ runs:
using: composite
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: pip install git+https://github.com/ComPWA/update-pip-constraints@main
shell: bash
- run: update-pip-constraints
shell: bash
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: .constraints/py${{ inputs.python-version }}.txt
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"
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ reportUnusedVariable = true
typeCheckingMode = "strict"

[tool.pytest.ini_options]
addopts = """
--color=yes
--doctest-continue-on-failure
--doctest-modules
--durations=3"""
addopts = [
"--color=yes",
"--doctest-continue-on-failure",
"--doctest-modules",
"--durations=3",
]
filterwarnings = [
"error",
"ignore:Creating a LegacyVersion has been deprecated.*:DeprecationWarning",
Expand Down Expand Up @@ -156,6 +157,7 @@ task-tags = ["cspell"]
"PLR0913",
"PLR2004",
"S101",
"T20",
]

[tool.ruff.pydocstyle]
Expand Down

0 comments on commit 69ee2fe

Please sign in to comment.