forked from luminartech/dev-tools
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (93 loc) · 2.9 KB
/
Copy pathpyproject.toml
File metadata and controls
105 lines (93 loc) · 2.9 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[build-system]
requires = ["uv_build>=0.10.0,<0.12"]
build-backend = "uv_build"
[project]
name = "dev-tools"
version = "1.12.1" # Will be read by the release pipeline
description = ""
readme = "README.md"
authors = [
{name = "Markus Hofbauer"}
]
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.10"
dependencies = [
"pre-commit>=4.2.0",
"pyjson5>=1.6.8",
"regex>=2026.2.28",
"ruamel-yaml>=0.19.1",
"configure-vscode-for-bazel",
"whoowns"
]
[project.optional-dependencies]
dev = [
"pytest>=9.0.3",
"pytest-cov",
"pyfakefs",
"types-regex"
]
[project.scripts]
check-jira-reference-in-todo = "dev_tools.check_jira_reference_in_todo:main"
check-load-statement = "dev_tools.check_load_statement:main"
check-rule-has-tag = "dev_tools.check_rule_has_tag:main"
check-forbidden-tags = "dev_tools.check_forbidden_tags:main"
check-max-one-sentence-per-line = "dev_tools.check_max_one_sentence_per_line:main"
check-number-of-lines-count = "dev_tools.check_number_of_lines_count:main"
check-ownership = "dev_tools.check_ownership:main"
check-shellscript-set-options = "dev_tools.check_shellscript_set_options:main"
check-useless-exclude-paths-hooks = "dev_tools.check_useless_exclude_paths_hooks:main"
generate-hook-docs = "dev_tools.generate_hook_docs:main"
print-pre-commit-metrics = "dev_tools.print_pre_commit_metrics:main"
sync-vscode-config = "dev_tools.sync_vscode_config:main"
sync-tool-versions = "dev_tools.sync_tool_versions:main"
[tool.pytest.ini_options]
addopts = "--cov-report term-missing --cov=dev_tools --cov=packages/whoowns/whoowns --cov=packages/configure_vscode_for_bazel/configure_vscode_for_bazel -vv"
testpaths = [
"tests"
]
[tool.ruff]
fix = true
unsafe-fixes = true
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A00",
"ANN001",
"COM812",
"D100", # In our opinion overkill
"D102", # In our opinion overkill
"D103",
"D107", # In our opinion overkill
"D203", # Conflicts with ruff-format, incpompatible with D211
"D213", # Incompatible with D212
"E501", # Line length is the task of the formatter
"FA100",
"ISC001", # Conflicts with formatter
"LOG015",
"S603",
"T201"
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"ANN201", # don't require -> None for every test. Accept non-enforcement for test helper functions
"PLR2004", # Magic values in tests are ok since they are often the expected values
"S101" # allow assertions in tests
]
[tool.ty.terminal]
error-on-warning = true
[tool.uv.build-backend]
module-root = "" # required to avoid the "src" layout, which is the default for uv_build
[tool.uv.sources]
configure-vscode-for-bazel = {workspace = true}
whoowns = {workspace = true}
[tool.uv.workspace]
members = ["packages/configure_vscode_for_bazel", "packages/whoowns"]
[tool.vulture]
min_confidence = 100
ignore_decorators = ["@pytest.fixture"]
exclude = [
"*test_*.py" # vulture doesn't understand pytest fixtures
]