Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
python-version: 3.13
- name: Install tox
run: python -m pip install tox
- name: Run codespell
run: tox -e codespell
- name: Run code format checks
run: tox -e format_check
- name: Run pre-commit checks
uses: pre-commit/[email protected]
with:
extra_args: --all-files

test:
needs:
Expand Down
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ ignore-words-list = [
quiet-level = 3
# https://docs.astral.sh/ruff/settings/
[tool.ruff]
extend-exclude = []
extend-exclude = [
]
force-exclude = true
line-length = 120
# Assume Python 3.9
Expand Down Expand Up @@ -211,27 +212,25 @@ commands = [
]

[tool.tox.env.format]
description = "Run ruff code formatter."
description = "Run code formatter and code-fixing linter."
skip_install = true
deps = ["ruff==0.11.13"]
deps = ["pre-commit"]
commands = [
["ruff", "format", "{posargs:.}"],
["pre-commit", "run", "--all-files", "--show-diff-on-failure", { replace = "posargs", extend = true }]
]

[tool.tox.env.format_check]
description = "Check that code is correctly formatted by ruff."
skip_install = true
deps = ["ruff==0.11.13"]
commands = [
["ruff", "format", "--check", "{posargs:.}"],
]

[tool.tox.env.lint]
description = "Run code linter and formatter (no fixes)."
skip_install = true
deps = ["ruff==0.11.13"]
commands = [
["ruff", "check", "{posargs:.}"],
["ruff", "format", "{posargs:.}"],
]

[tool.uv-dynamic-versioning]
Expand Down
Loading