Skip to content
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- "3.10"
- "3.9"
- "3.8"
- "3.7"
os:
- ubuntu-latest
- windows-2022
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.282"
rev: "v0.0.284"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -19,10 +19,10 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "0.13.0"
rev: "0.13.1"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.6"]
additional_dependencies: ["tox>=4.8"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.1"
hooks:
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.3",
"hatchling>=1.14.1",
"hatchling>=1.18",
]

[project]
Expand All @@ -19,7 +19,7 @@ keywords = [
license = "MIT"
maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
authors = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: tox",
Expand All @@ -29,7 +29,6 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -42,14 +41,15 @@ dynamic = [
"version",
]
dependencies = [
"devpi-client>=6.0.4",
"devpi-server>=6.8",
"devpi-client>=6.0.5",
"devpi-server>=6.9.2",
'typing-extensions>=4.7.1; python_version < "3.11"',
]
optional-dependencies.test = [
"covdefaults>=2.3",
"httpx>=0.24",
"pytest>=7.3.1",
"pytest-cov>=4",
"httpx>=0.24.1",
"pytest>=7.4",
"pytest-cov>=4.1",
]
urls.Homepage = "https://github.com/tox-dev/devpi-process#readme"
urls.Source = "https://github.com/tox-dev/devpi-process"
Expand All @@ -65,7 +65,7 @@ line-length = 120
[tool.ruff]
select = ["ALL"]
line-length = 120
target-version = "py37"
target-version = "py38"
isort = {known-first-party = ["devpi_process"], required-imports = ["from __future__ import annotations"]}
ignore = [
"ANN101", # no typoe annotation for self
Expand Down
7 changes: 6 additions & 1 deletion src/devpi_process/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
if TYPE_CHECKING:
from types import TracebackType

if sys.version_info >= (3, 11): # pragma: no cover (py311+)
from typing import Self
else: # pragma: no cover (<py311)
from typing_extensions import Self


def _check_call(cmd: list[str]) -> None:
run(cmd, check=True, capture_output=True) # noqa: S603
Expand Down Expand Up @@ -109,7 +114,7 @@ def user(self) -> str:
""":return: username of the index server"""
return "root"

def __enter__(self) -> IndexServer:
def __enter__(self) -> Self:
""":return: start the index server"""
self._create_and_start_server()
self._setup_client()
Expand Down
17 changes: 7 additions & 10 deletions tests/demo_pkg_inline/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@
Tag: py{sys.version_info[0]}-none-any
""",
f"{dist_info}/top_level.txt": name,
record: """
{0}/__init__.py,,
{1}/METADATA,,
{1}/WHEEL,,
{1}/top_level.txt,,
{1}/RECORD,,
""".format(
name,
dist_info,
),
record: f"""
{name}/__init__.py,,
{dist_info}/METADATA,,
{dist_info}/WHEEL,,
{dist_info}/top_level.txt,,
{dist_info}/RECORD,,
""",
}


Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ commands =
description = run static analysis and style check using flake8
skip_install = true
deps =
pre-commit>=3.2.2
pre-commit>=3.3.3
pass_env =
HOMEPATH
PROGRAMDATA
Expand All @@ -44,7 +44,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.3
mypy==1.5
set_env =
{tty:MYPY_FORCE_COLOR = 1}
commands =
Expand Down