Skip to content

Commit

Permalink
bump tox to 4.21 & use native toml config
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Oct 1, 2024
1 parent a5d94fc commit cc8446b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 36 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ repos:
entry: uv run mypy
language: system
types_or: [python, pyi]
exclude: ^examples

- id: basedpyright
name: basedpyright
Expand Down
33 changes: 14 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "unpy"
version = "0.2.2.dev0"
version = "0.3.0.dev0"
description = "Backports Python Typing Stubs"
readme = "README.md"
license = "BSD-3-Clause"
Expand Down Expand Up @@ -73,7 +73,7 @@ dev-dependencies = [
"pre-commit>=3.8.0,<4",
"pytest>=8.3.3,<9",
"ruff>=0.6.8,<1",
"tox>=4.20.0,<5",
"tox>=4.21.0,<5",
]

[tool.mypy]
Expand Down Expand Up @@ -179,25 +179,20 @@ max-locals = 32
max-statements = 100

[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
requires = tox>=4
envlist =
pre-commit
py{312,313rc2}
# requires = ["tox>=4.21"]
env_list = ["3.12", "3.13", "precommit"]

[testenv]
description = pytest
[tool.tox.env_run_base]
description = "test with {base_python}"
skip_install = true
allowlist_externals = uv
commands_pre = uv sync --frozen --dev
commands = uv run pytest
allowlist_externals = ["uv"]
commands_pre = [["uv", "sync", "--frozen", "--dev"]]
commands = [["uv", "run", "pytest"]]

[testenv:pre-commit]
description = pre-commit
[tool.tox.env.precommit]
description = "pre-commit"
skip_install = true
allowlist_externals = uv
commands_pre = uv sync --frozen --dev
commands = uv run pre-commit run --all-files
"""
allowlist_externals = ["uv"]
commands_pre = [["uv", "sync", "--frozen", "--dev"]]
commands = [["uv", "run", "pre-commit", "run", "--all-files"]]
34 changes: 17 additions & 17 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc8446b

Please sign in to comment.