Skip to content

Commit 2f35f13

Browse files
committed
Move dependencies to pyproject.toml
We also remove redundant flake8 configuration and bump the ruff pre-commit hook. Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 6609669 commit 2f35f13

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: end-of-file-fixer
1010
- id: trailing-whitespace
1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.16.6
12+
rev: v0.17.0
1313
hooks:
1414
- id: ruff-check
1515
args: ['--fix', '--unsafe-fixes']

‎pyproject.toml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ maintainers = [
1414
]
1515
readme = {file = "README.rst", content-type = "text/x-rst"}
1616
license = "GPL-2.0"
17-
dynamic = ["version", "dependencies"]
17+
dynamic = ["version"]
1818
requires-python = ">=3.11"
1919
keywords = ["patchwork", "api"]
2020
classifiers = [
@@ -28,6 +28,15 @@ classifiers = [
2828
"Operating System :: OS Independent",
2929
]
3030

31+
[dependency-groups]
32+
test = [
33+
"pytest",
34+
"pytest-cov",
35+
]
36+
typing = [
37+
"mypy",
38+
]
39+
3140
[project.urls]
3241
"Bug Tracker" = "https://github.com/getpatchwork/pwclient/issues"
3342
"Source Code" = "https://github.com/getpatchwork/pwclient"
@@ -36,10 +45,8 @@ classifiers = [
3645
[project.scripts]
3746
pwclient = "pwclient.shell:main"
3847

39-
[tool.setuptools]
40-
packages = [
41-
"pwclient"
42-
]
48+
[tool.setuptools.packages.find]
49+
include = ["pwclient*"]
4350

4451
[tool.ruff]
4552
line-length = 79

‎test-requirements.txt‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎tox.ini‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ minversion = 4.6.0
33
envlist = pep8,clean,py{311,312,313,314,315},report,docs,man
44

55
[testenv]
6-
deps =
7-
-r{toxinidir}/test-requirements.txt
6+
dependency_groups =
7+
test
88
commands =
99
pytest -Wall --cov=pwclient --cov-report term-missing {posargs}
1010

@@ -16,9 +16,9 @@ commands =
1616
pre-commit run --all-files --show-diff-on-failure
1717

1818
[testenv:mypy]
19-
deps=
19+
dependency_groups =
2020
mypy
21-
commands=
21+
commands =
2222
mypy {posargs:--ignore-missing-imports --follow-imports=skip} pwclient
2323

2424
[testenv:report]
@@ -57,6 +57,3 @@ commands =
5757
--url https://github.com/getpatchwork/patchwork \
5858
--author="Patchwork Developers" --author-email="patchwork@lists.ozlabs.org" \
5959
--module pwclient.parser --function get_parser > man/pwclient.1'
60-
61-
[flake8]
62-
show-source = true

0 commit comments

Comments
 (0)