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 12, 2024
1 parent 74ee7d7 commit 73d488a
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 81 deletions.
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
23 changes: 2 additions & 21 deletions .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,5 @@ on:
- unlabeled

jobs:
check-labels:
name: Check labels
runs-on: ubuntu-22.04
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest # cspell:ignore agilepathway
with:
any_of: >-
🐛 Bug,✨ Feature,⚙️ Enhancement,⚠️ Interface,❗ Behavior,📝 Docs,🔨 Maintenance,🖱️ DX
none_of: Epic,💫 Good first issue
repo_token: ${{ secrets.GITHUB_TOKEN }}

check-title:
name: Check title
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: npm install @compwa/commitlint-config
- name: Create commitlint config
run: |
echo "module.exports = {extends: ['@compwa/commitlint-config']}" > commitlint.config.js
- uses: JulienKode/[email protected] # cspell:ignore kode
lint-pr:
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v1
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 }}
4 changes: 1 addition & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ vscode:
- executablebookproject.myst-highlight
- github.vscode-github-actions
- github.vscode-pull-request-github
- ms-python.black-formatter
- ms-python.python
- ms-vscode.live-server
- redhat.vscode-yaml
- Soulcode.vscode-unwanted-extensions
- soulcode.vscode-unwanted-extensions
- stkb.rewrap
- streetsidesoftware.code-spell-checker
- tamasfe.even-better-toml
- tyriar.sort-lines
- yzhang.markdown-all-in-one
17 changes: 6 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -32,11 +38,6 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace

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

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
Expand Down Expand Up @@ -88,9 +89,3 @@ repos:
hooks:
- id: pyright

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: ruff
args:
- --fix
8 changes: 4 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
"executablebookproject.myst-highlight",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"ms-python.black-formatter",
"ms-python.python",
"ms-vscode.live-server",
"redhat.vscode-yaml",
"Soulcode.vscode-unwanted-extensions",
"soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"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.mypy-type-checker",
"ms-python.pylint",
"travisillig.vscode-json-stable-stringify"
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
}
30 changes: 23 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"editor.formatOnSave": false
},
"[git-commit]": {
"editor.rulers": [72],
"editor.rulers": [
72
],
"rewrap.wrappingColumn": 72
},
"[json]": {
Expand All @@ -22,13 +24,14 @@
"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",
"cSpell.enabled": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
Expand All @@ -39,17 +42,30 @@
"**/.tox/**": 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,
"python.testing.pytestArgs": ["--color=no", "--no-cov"],
"notebook.codeActionsOnSave": {
"notebook.source.organizeImports": "explicit"
},
"notebook.formatOnSave.enabled": true,
"python.testing.pytestArgs": [
"--color=no",
"--no-cov"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": false,
"redhat.telemetry.enabled": false,
"rewrap.wrappingColumn": 88,
"ruff.enable": true,
"ruff.importStrategy": "fromEnvironment",
"ruff.organizeImports": true,
"search.exclude": {
"**/tests/**/__init__.py": true,
"*/tox.ini": true
}
},
"telemetry.telemetryLevel": "off"
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/redeboer/bossdoc/main.svg)](https://results.pre-commit.ci/latest/github/redeboer/bossdoc/main)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![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)

This repository contains the source code for the
Expand Down
47 changes: 15 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ doc = [
"sphinx-togglebutton",
"sphinxcontrib-bibtex >=2",
]
format = [
"black",
]
lint = [
"ruff",
"sphinx-api-relink",
Expand All @@ -73,6 +70,7 @@ sty = [
"bossdoc[format]",
"bossdoc[lint]",
"pre-commit >=1.4.0",
"ruff",
]

[project.readme]
Expand All @@ -91,31 +89,6 @@ include-package-data = false
[tool.setuptools_scm]
write_to = "version.py"

[tool.black]
exclude = '''
/(
.*\.egg-info
| .*build
| \.eggs
| \.git
| \.pytest_cache
| \.tox
| \.venv
| \.vscode
| dist
)/
'''
include = '\.pyi?$'
preview = true
target-version = [
"py310",
"py311",
"py312",
"py37",
"py38",
"py39",
]

[tool.pyright]
exclude = [
".git",
Expand Down Expand Up @@ -143,6 +116,11 @@ typeCheckingMode = "strict"

[tool.ruff]
extend-exclude = ["typings"]
show-fixes = true
target-version = "py37"
preview = true

[tool.ruff.lint]
extend-select = [
"A",
"B",
Expand Down Expand Up @@ -186,14 +164,14 @@ ignore = [
"D407",
"D416",
"E501",
"ISC001",
"PLW1514",
"SIM108",
"UP036",
]
show-fixes = true
target-version = "py37"
task-tags = ["cspell"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"docs/*" = [
"E402",
"INP001",
Expand All @@ -209,9 +187,14 @@ task-tags = ["cspell"]
]
"setup.py" = ["D100"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.format]
docstring-code-format = true
line-ending = "lf"
[tool.tomlsort]
all = false
ignore_case = true
Expand Down

0 comments on commit 73d488a

Please sign in to comment.