Skip to content

Commit ef4708d

Browse files
[pre-commit.ci] pre-commit autoupdate (#108)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1b8cfb8 commit ef4708d

6 files changed

Lines changed: 61 additions & 38 deletions

File tree

.github/workflows/check.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: check
22
on:
33
workflow_dispatch:
44
push:
5-
branches: "main"
5+
branches: ["main"]
66
tags-ignore: ["**"]
77
pull_request:
88
schedule:
@@ -20,6 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
py:
23+
- "3.12"
2324
- "3.11"
2425
- "3.10"
2526
- "3.9"
@@ -33,9 +34,9 @@ jobs:
3334
- name: Setup python for tox
3435
uses: actions/setup-python@v5
3536
with:
36-
python-version: "3.11"
37+
python-version: "3.12"
3738
- name: Install tox
38-
run: python -m pip install tox
39+
run: python -m pip install tox-uv
3940
- uses: actions/checkout@v4
4041
with:
4142
fetch-depth: 0
@@ -83,7 +84,7 @@ jobs:
8384
with:
8485
python-version: "3.11"
8586
- name: Install tox
86-
run: python -m pip install tox
87+
run: python -m pip install tox-uv
8788
- name: Setup test suite
8889
run: tox -vv --notest -e ${{ matrix.tox_env }}
8990
- name: Run test suite

.pre-commit-config.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ repos:
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
7-
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: "v0.1.14"
7+
- repo: https://github.com/python-jsonschema/check-jsonschema
8+
rev: 0.28.0
99
hooks:
10-
- id: ruff
11-
args: [--fix, --exit-non-zero-on-fix]
12-
- repo: https://github.com/psf/black
13-
rev: 24.1.1
10+
- id: check-github-workflows
11+
args: [ "--verbose" ]
12+
- repo: https://github.com/codespell-project/codespell
13+
rev: v2.2.6
1414
hooks:
15-
- id: black
15+
- id: codespell
16+
additional_dependencies: ["tomli>=2.0.1"]
1617
- repo: https://github.com/tox-dev/tox-ini-fmt
1718
rev: "1.3.1"
1819
hooks:
@@ -22,7 +23,13 @@ repos:
2223
rev: "1.7.0"
2324
hooks:
2425
- id: pyproject-fmt
25-
additional_dependencies: ["tox>=4.11.4"]
26+
additional_dependencies: ["tox>=4.13"]
27+
- repo: https://github.com/astral-sh/ruff-pre-commit
28+
rev: "v0.2.1"
29+
hooks:
30+
- id: ruff-format
31+
- id: ruff
32+
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
2633
- repo: meta
2734
hooks:
2835
- id: check-hooks-apply

pyproject.toml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.4",
5-
"hatchling>=1.18",
5+
"hatchling>=1.21.1",
66
]
77

88
[project]
@@ -33,6 +33,7 @@ classifiers = [
3333
"Programming Language :: Python :: 3.9",
3434
"Programming Language :: Python :: 3.10",
3535
"Programming Language :: Python :: 3.11",
36+
"Programming Language :: Python :: 3.12",
3637
"Topic :: Software Development :: Libraries",
3738
"Topic :: Software Development :: Testing",
3839
"Topic :: Utilities",
@@ -42,13 +43,13 @@ dynamic = [
4243
]
4344
dependencies = [
4445
"devpi-client>=7.0.2",
45-
"devpi-server>=6.9.2",
46-
'typing-extensions>=4.8; python_version < "3.11"',
46+
"devpi-server>=6.10",
47+
'typing-extensions>=4.9; python_version < "3.11"',
4748
]
4849
optional-dependencies.test = [
4950
"covdefaults>=2.3",
50-
"httpx>=0.25.2",
51-
"pytest>=7.4.3",
51+
"httpx>=0.27",
52+
"pytest>=8.0.1",
5253
"pytest-cov>=4.1",
5354
]
5455
urls.Homepage = "https://github.com/tox-dev/devpi-process#readme"
@@ -63,27 +64,39 @@ version.source = "vcs"
6364
line-length = 120
6465

6566
[tool.ruff]
66-
select = ["ALL"]
6767
line-length = 120
6868
target-version = "py38"
69-
isort = {known-first-party = ["devpi_process"], required-imports = ["from __future__ import annotations"]}
70-
ignore = [
71-
"ANN101", # no typoe annotation for self
72-
"ANN401", # allow Any as type annotation
73-
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
74-
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
75-
"S104", # Possible binding to all interface
69+
lint.isort = { known-first-party = ["devpi_process"], required-imports = ["from __future__ import annotations"] }
70+
lint.select = ["ALL"]
71+
lint.ignore = [
72+
"ANN101", # no type annotation for self
73+
"ANN401", # allow Any as type annotation
74+
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
75+
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
76+
"S104", # Possible binding to all interface
77+
"COM812", # Conflict with formatter
78+
"ISC001", # Conflict with formatter
79+
"CPY", # No copyright statements
7680
]
77-
[tool.ruff.per-file-ignores]
81+
lint.preview = true
82+
format.preview = true
83+
format.docstring-code-format = true
84+
format.docstring-code-line-length = 100
85+
[tool.ruff.lint.per-file-ignores]
7886
"tests/**/*.py" = [
79-
"S101", # asserts allowed in tests...
80-
"FBT", # don"t care about booleans as positional arguments in tests
81-
"INP001", # no implicit namespace
82-
"D", # don"t care about documentation in tests
83-
"S603", # `subprocess` call: check for execution of untrusted input
84-
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
87+
"S101", # asserts allowed in tests...
88+
"FBT", # don't care about booleans as positional arguments in tests
89+
"INP001", # no implicit namespace
90+
"D", # don"t care about documentation in tests
91+
"S603", # `subprocess` call: check for execution of untrusted input
92+
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
8593
]
8694

95+
[tool.codespell]
96+
builtin = "clear,usage,en-GB_to_en-US"
97+
write-changes = true
98+
count = true
99+
87100
[tool.coverage]
88101
html.show_contexts = true
89102
html.skip_covered = false

src/devpi_process/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import sysconfig
1010
from contextlib import closing
1111
from pathlib import Path
12-
from subprocess import PIPE, Popen, run
12+
from subprocess import PIPE, Popen, run # noqa: S404
1313
from threading import Thread
1414
from typing import IO, TYPE_CHECKING, Iterator, Sequence, cast
1515

@@ -215,7 +215,7 @@ def _find_free_port() -> int:
215215

216216

217217
__all__ = [
218-
"__version__",
219218
"Index",
220219
"IndexServer",
220+
"__version__",
221221
]

tests/test_devpi_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
def test_version() -> None:
17-
import devpi_process
17+
import devpi_process # noqa: PLC0415
1818

1919
assert devpi_process.__version__ is not None
2020

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ requires =
33
tox>=4.2
44
env_list =
55
fix
6+
py312
67
py311
78
py310
89
py39
@@ -33,7 +34,7 @@ commands =
3334
description = run static analysis and style check using flake8
3435
skip_install = true
3536
deps =
36-
pre-commit>=3.5
37+
pre-commit>=3.6.2
3738
pass_env =
3839
HOMEPATH
3940
PROGRAMDATA
@@ -43,7 +44,7 @@ commands =
4344
[testenv:type]
4445
description = run type check on code base
4546
deps =
46-
mypy==1.7.1
47+
mypy==1.8
4748
set_env =
4849
{tty:MYPY_FORCE_COLOR = 1}
4950
commands =
@@ -55,7 +56,7 @@ description = check that the long description is valid
5556
skip_install = true
5657
deps =
5758
build[virtualenv]>=1.0.3
58-
twine>=4.0.2
59+
twine>=5
5960
commands =
6061
python -m build --sdist --wheel -o {envtmpdir} .
6162
twine check {envtmpdir}/*
@@ -69,3 +70,4 @@ extras =
6970
commands =
7071
python -m pip list --format=columns
7172
python -c 'import sys; print(sys.executable)'
73+
uv_seed = true

0 commit comments

Comments
 (0)