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 Mar 6, 2024
1 parent 8b3fe93 commit ee87d35
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 139 deletions.
10 changes: 0 additions & 10 deletions .github/dependabot.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: |-
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
env:
PYTHONHASHSEED: "0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
update_release_draft:
runs-on: ubuntu-22.04
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Requirements

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: |-
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
on:
pull_request:
Expand Down
8 changes: 3 additions & 5 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tasks:
- init: pyenv local 3.8
- init: pip install -c .constraints/py3.8.txt -e .[dev]
- init: pyenv local 3.9
- init: pip install -c .constraints/py3.9.txt -e .[dev]

github:
prebuilds:
Expand All @@ -22,7 +22,6 @@ vscode:
- executablebookproject.myst-highlight
- github.vscode-github-actions
- github.vscode-pull-request-github
- ms-python.black-formatter
- ms-python.mypy-type-checker
- ms-python.python
- ms-python.vscode-pylance
Expand All @@ -31,10 +30,9 @@ vscode:
- ms-vsliveshare.vsliveshare
- redhat.vscode-yaml
- ryanluker.vscode-coverage-gutters
- Soulcode.vscode-unwanted-extensions
- soulcode.vscode-unwanted-extensions
- stkb.rewrap
- streetsidesoftware.code-spell-checker
- tamasfe.even-better-toml
- trentrand.git-commit-helper-vscode
- tyriar.sort-lines
- yzhang.markdown-all-in-one
104 changes: 48 additions & 56 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,40 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --extra-keys
- |
cell.attachments
cell.metadata.code_folding
cell.metadata.id
cell.metadata.pycharm
cell.metadata.user_expressions
metadata.celltoolbar
metadata.colab.name
metadata.colab.provenance
metadata.interpreter
metadata.notify_time
metadata.toc
metadata.toc-autonumbering
metadata.toc-showcode
metadata.toc-showmarkdowntxt
metadata.toc-showtags
metadata.varInspector
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff
args: [--fix]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -31,16 +65,22 @@ repos:
args: ["--django"]
- id: trailing-whitespace

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: black
- id: black-jupyter
args:
- --line-length=85
types_or:
- jupyter
- id: prettier

- repo: https://github.com/ComPWA/mirrors-taplo
rev: v0.8.1
hooks:
- id: taplo

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args:
- --in-place
- repo: https://github.com/ComPWA/policy
rev: 0.2.6
hooks:
Expand Down Expand Up @@ -77,56 +117,8 @@ repos:
types:
- python

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --extra-keys
- |
cell.attachments
cell.metadata.code_folding
cell.metadata.id
cell.metadata.pycharm
cell.metadata.user_expressions
metadata.celltoolbar
metadata.colab.name
metadata.colab.provenance
metadata.interpreter
metadata.notify_time
metadata.toc
metadata.toc-autonumbering
metadata.toc-showcode
metadata.toc-showmarkdowntxt
metadata.toc-showtags
metadata.varInspector
metadata.vscode
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier

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

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

- repo: https://github.com/ComPWA/mirrors-taplo
rev: v0.8.1
hooks:
- id: taplo

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args:
- --in-place
8 changes: 4 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"executablebookproject.myst-highlight",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
Expand All @@ -17,21 +16,22 @@
"ms-vsliveshare.vsliveshare",
"redhat.vscode-yaml",
"ryanluker.vscode-coverage-gutters",
"Soulcode.vscode-unwanted-extensions",
"soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"trentrand.git-commit-helper-vscode",
"tyriar.sort-lines",
"yzhang.markdown-all-in-one"
],
"unwantedRecommendations": [
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"garaioag.garaio-vscode-unwanted-recommendations",
"ms-python.black-formatter",
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
"travisillig.vscode-json-stable-stringify"
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
}
35 changes: 27 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"[git-commit]": {
"editor.rulers": [72],
"editor.rulers": [
72
],
"rewrap.wrappingColumn": 72
},
"[ipynb]": {
Expand All @@ -19,43 +21,60 @@
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88]
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.rulers": [
88
]
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"black-formatter.importStrategy": "fromEnvironment",
"coverage-gutters.coverageFileNames": ["coverage.xml"],
"coverage-gutters.coverageFileNames": [
"coverage.xml"
],
"coverage-gutters.coverageReportFileName": "**/htmlcov/index.html",
"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true,
"cSpell.enabled": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
"github-actions.workflows.pinned.workflows": [
".github/workflows/ci.yml"
],
"gitlens.telemetry.enabled": false,
"livePreview.defaultPreviewPath": "docs/_build/html",
"multiDiffEditor.experimental.enabled": true,
"mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"],
"mypy-type-checker.args": [
"--config-file=${workspaceFolder}/pyproject.toml"
],
"mypy-type-checker.importStrategy": "fromEnvironment",
"notebook.codeActionsOnSave": {
"notebook.source.organizeImports": "explicit"
},
"notebook.formatOnSave.enabled": true,
"notebook.gotoSymbols.showAllSymbols": true,
"python.analysis.autoImportCompletions": false,
"python.analysis.inlayHints.pytestParameters": true,
"python.analysis.typeCheckingMode": "strict",
"python.languageServer": "Pylance",
"python.testing.pytestArgs": ["--color=no", "--no-cov"],
"python.testing.pytestArgs": [
"--color=no",
"--no-cov"
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"redhat.telemetry.enabled": false,
"rewrap.wrappingColumn": 88,
"ruff.enable": true,
"ruff.importStrategy": "fromEnvironment",
"ruff.organizeImports": true,
"search.exclude": {
"*/.pydocstyle": true,
".constraints/*.txt": true,
"tests/**/__init__.py": true
},
"telemetry.telemetryLevel": "off",
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///home/redeboer/dev/redeboer/PawianTools/.github/workflows/requirements.yml"
}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<br>
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen)](https://github.com/pre-commit/pre-commit)
[![Prettier](https://camo.githubusercontent.com/687a8ae8d15f9409617d2cc5a30292a884f6813a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f7374796c652d70726574746965722d6666363962342e7376673f7374796c653d666c61742d737175617265)](https://prettier.io/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

Go to [redeboer.github.io/PawianTools](https://redeboer.github.io/PawianTools) to view
Expand Down
24 changes: 14 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
set_intersphinx_version_remapping,
)

set_intersphinx_version_remapping({
"ipython": {
"8.12.2": "8.12.1",
"8.12.3": "8.12.1",
},
})
set_intersphinx_version_remapping(
{
"ipython": {
"8.12.2": "8.12.1",
"8.12.3": "8.12.1",
},
}
)

BRANCH = get_branch_name()
ORGANIZATION = "redeboer"
Expand All @@ -45,10 +47,12 @@
"members": True,
"undoc-members": True,
"show-inheritance": True,
"special-members": ", ".join([
"__call__",
"__eq__",
]),
"special-members": ", ".join(
[
"__call__",
"__eq__",
]
),
}
autodoc_member_order = "bysource"
autodoc_typehints_format = "short"
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ channels:
dependencies:
- graphviz # for binder
- pip
- python==3.8.*
- python==3.9.*
- pip:
- -c .constraints/py3.8.txt -e .[dev]
- -c .constraints/py3.9.txt -e .[dev]
variables:
PRETTIER_LEGACY_CLI: "1"
Loading

0 comments on commit ee87d35

Please sign in to comment.