-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
83 lines (73 loc) · 1.64 KB
/
pyproject.toml
File metadata and controls
83 lines (73 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[project]
name = "andrewaylett-pre-commit-hooks"
version = "0.1.0"
description = "Andrew's pre-commit hooks"
readme = "README.md"
authors = [
{ name = "Andrew Aylett", email = "andrew@aylett.co.uk" }
]
requires-python = ">=3.11"
dependencies = [
"cogapp>=3.5.1",
"ruamel.yaml>=0.17.0",
"uv>=0.7.20",
]
[dependency-groups]
dev = [
"pytest>=7.4.0",
"ruff>=0.12.0",
"pre-commit>=4.2.0",
"pyyaml>=6.0",
"pre-commit-uv>=4.1.4",
"pytest-xdist>=3.8.0",
"pytest-env>=1.1.5",
"poethepoet>=0.36.0",
"ty>=0.0.1a26",
]
[tool.ruff.lint]
select = [
# pycodestyle
"E4", "E7", "E9",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# Ruff
"RUF",
# isort
"I",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "-n auto --durations=0"
env = [
"FORCE_PRE_COMMIT_UV_PATCH=1"
]
[project.scripts]
pre-commit-cog = "andrewaylett_pre_commit_hooks.cog:main"
pre-commit-init-hooks = "andrewaylett_pre_commit_hooks.init_hooks:main"
pre-commit-uv-run = "andrewaylett_pre_commit_hooks.uv_run:main"
[tool.poe.tasks.check]
sequence = ["format", "lint", "type", "test"]
help = "Format and run all static checks"
ignore_fail = "return_non_zero"
[tool.poe.tasks.format]
cmd = "uv run ruff format"
help = "Run Ruff to format code"
[tool.poe.tasks.lint]
cmd = "uv run ruff check --fix --unsafe-fixes"
help = "Run Ruff to check and fix code"
[tool.poe.tasks.type]
cmd = "uv run ty check"
help = "Run ty for type checks"
[tool.poe.tasks.test]
cmd = "uv run pytest"
help = "Run Pytest for unit tests"
[build-system]
requires = ["uv_build>=0.11.1,<0.12.0"]
build-backend = "uv_build"