forked from bufbuild/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
76 lines (62 loc) · 1.6 KB
/
Copy pathpyproject.toml
File metadata and controls
76 lines (62 loc) · 1.6 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
[project]
name = "license-header"
version = "0.0.1"
description = "Handle license headers"
requires-python = ">=3.10"
license = "Apache-2.0"
license-files = ["LICENSE"]
dependencies = ["tomli==2.4.1"]
[project.scripts]
license-header = "license_header:main"
[dependency-groups]
dev = [
"poethepoet==0.46.0",
"pytest==9.1.1",
"pytest-cov==7.1.0",
"ruff==0.15.18",
"tombi==1.1.4",
"ty==0.0.51",
]
[build-system]
requires = ["uv_build>=0.11.2,<0.12"]
build-backend = "uv_build"
[tool.licenseheader]
copyright-holder = "Buf Technologies, Inc."
year-range = "2025-2026"
## Format
[tool.poe.tasks.format]
help = "Apply all autoformatting"
sequence = ["format-license-header", "format-python", "format-toml"]
[tool.poe.tasks.format-python]
help = "Format Python files with ruff"
sequence = [
{ cmd = "ruff check --fix --unsafe-fixes --exit-zero ." },
{ cmd = "ruff format" }
]
[tool.poe.tasks.format-license-header]
help = "Add/update license headers in source files"
cmd = "license-header"
[tool.poe.tasks.format-toml]
help = "Format TOML files with tombi"
cmd = "tombi format"
[tool.poe.tasks.lint]
help = "Apply all lints"
sequence = ["lint-license-header", "lint-python", "lint-toml"]
[tool.poe.tasks.lint-license-header]
help = "Lint license headers"
cmd = "license-header --check"
[tool.poe.tasks.lint-python]
help = "Lint Python files"
sequence = [
{ cmd = "ruff check ." },
{ cmd = "ruff format --check ." },
{ cmd = "ty check" },
]
[tool.poe.tasks.lint-toml]
help = "Lint TOML files"
cmd = "tombi lint"
[tool.poe.tasks.test]
help = "Run tests"
cmd = "pytest"
[tool.pytest]
filterwarnings = ["error"]