|
2 | 2 | build-backend = "flit_core.buildapi" |
3 | 3 | requires = ["flit_core >=3.4,<4"] |
4 | 4 |
|
| 5 | +[dependency-groups] |
| 6 | +dev = [ |
| 7 | + "tox-uv>=1.22.1" |
| 8 | +] |
| 9 | +lint = [ |
| 10 | + "pre-commit", |
| 11 | + "ruff>=0.9.5" |
| 12 | +] |
| 13 | +test = [ |
| 14 | + "betamax >=0.8, <0.9", |
| 15 | + "coverage>=7.6.10", |
| 16 | + "pytest>=8.3.4", |
| 17 | + "urllib3 ==1.*" |
| 18 | +] |
| 19 | +type = [ |
| 20 | + "pyright>=1.1.393", |
| 21 | + "pytest>=8.3.4" |
| 22 | +] |
| 23 | + |
5 | 24 | [project] |
6 | 25 | authors = [{name = "Bryce Boe", email = "bbzbryce@gmail.com"}] |
7 | 26 | classifiers = [ |
@@ -31,23 +50,6 @@ name = "prawcore" |
31 | 50 | readme = "README.rst" |
32 | 51 | requires-python = "~=3.9" |
33 | 52 |
|
34 | | -[project.optional-dependencies] |
35 | | -dev = [ |
36 | | - "prawcore[lint]", |
37 | | - "prawcore[test]" |
38 | | -] |
39 | | -lint = [ |
40 | | - "pre-commit", |
41 | | - "ruff ==0.9.*" |
42 | | -] |
43 | | -test = [ |
44 | | - "betamax >=0.8, <0.9", |
45 | | - "pyright", |
46 | | - "pytest ==7.*", |
47 | | - "types-requests", |
48 | | - "urllib3 ==1.*" |
49 | | -] |
50 | | - |
51 | 53 | [project.urls] |
52 | 54 | "Issue Tracker" = "https://github.com/praw-dev/prawcore/issues" |
53 | 55 | "Source Code" = "https://github.com/praw-dev/prawcore" |
@@ -117,6 +119,50 @@ suppress-dummy-args = true |
117 | 119 |
|
118 | 120 | [tool.ruff.lint.per-file-ignores] |
119 | 121 | "__init__.py" = ["F401"] |
120 | | -"pre_push.py" = ["T201"] |
121 | 122 | "examples/*.py" = ["ANN", "PLR2004", "T201"] |
122 | 123 | "tests/**.py" = ["ANN", "D", "PLR2004", "S101", "S105", "S106", "S301"] |
| 124 | + |
| 125 | +[tool.tox] |
| 126 | +envlist = ["py39", "py310", "py311", "py312", "py313", "pre-commit", "style", "type"] |
| 127 | +minversion = "4.22" |
| 128 | + |
| 129 | +[tool.tox.env.pre-commit] |
| 130 | +commands = [ |
| 131 | + ["pre-commit", "run", "--all-files"] |
| 132 | +] |
| 133 | +description = "run pre-commit on code base" |
| 134 | +dependency_groups = ["lint"] |
| 135 | +runner = "uv-venv-lock-runner" |
| 136 | + |
| 137 | +[tool.tox.env.style] |
| 138 | +commands = [ |
| 139 | + ["ruff", "check"], |
| 140 | + ["ruff", "format", "--diff", "--target-version", "py39"] |
| 141 | +] |
| 142 | +description = "run lint check on code base" |
| 143 | +dependency_groups = ["lint"] |
| 144 | +runner = "uv-venv-lock-runner" |
| 145 | + |
| 146 | +[tool.tox.env.stylefix] |
| 147 | +commands = [ |
| 148 | + ["ruff", "check", "--fix"], |
| 149 | + ["ruff", "format", "--target-version", "py39"] |
| 150 | +] |
| 151 | +description = "run lint check on code base" |
| 152 | +dependency_groups = ["lint"] |
| 153 | +runner = "uv-venv-lock-runner" |
| 154 | + |
| 155 | +[tool.tox.env.type] |
| 156 | +commands = [["pyright", "prawcore"]] |
| 157 | +dependency_groups = ["type"] |
| 158 | +description = "run type check on code base" |
| 159 | +runner = "uv-venv-lock-runner" |
| 160 | + |
| 161 | +[tool.tox.env_run_base] |
| 162 | +commands = [ |
| 163 | + ["coverage", "run", "-m", "pytest", "{posargs}"], |
| 164 | + ["coverage", "report", "-m", "--fail-under=100"] |
| 165 | +] |
| 166 | +description = "Run test under {base_python}" |
| 167 | +dependency_groups = ["test"] |
| 168 | +runner = "uv-venv-lock-runner" |
0 commit comments