Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (93 loc) · 2.75 KB
/
Copy pathpyproject.toml
File metadata and controls
102 lines (93 loc) · 2.75 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
[project]
name = "fsfe-website"
version = "0.0.0"
description = "Workspace for the fsfe websites python tooling"
requires-python = "==3.14.*"
dependencies = ["fsfe-website-build", "fsfe-website-hooks"]
[dependency-groups]
dev = [
"lefthook", # pre-commit hook
"pyright", # python typechecker
"pytest", # python test runner
"pytest-cov", # coverage reports for python coverage
"pytest-mock", # helper for mocking in pytest
"reuse", # for enforcing licensing
"ruff", # python formatter and linter
"tombi", # toml formatter
"ty", # python typechecker
"types-lxml", # type stubs for lxml
]
notifications = [
"desktop-notifier", # send notification on completion optionally
]
[tool.coverage.run]
source = [
"fsfe_website_build.lib",
"fsfe_website_hooks.checks",
"fsfe_website_hooks.fixes",
"fsfe_website_hooks.lib",
]
[tool.coverage.report]
show_missing = true
fail_under = 100
[tool.pytest]
addopts = ["--import-mode=importlib"]
python_files = ["*_test.py"]
python_functions = ["*_test"]
testpaths = ["packages/*/test_*"]
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules/ for information
select = [
"ANN", # Flake 8 type annotations
"A", # prevent using keywords that clobber python builtins
"ARG", # Unused arguments
"ASYNC", # Flake 8 aysnc
"B", # bugbear: security warnings
"C4", # Comprehensions
"D", # pydocstyle, recommended with pydoclint
"E", # pycodestyle
"ERA", # Commented out code
"F", # pyflakes
"FURB", # More upgrades to newer styles
"G", # Logging Formatting
"I", # ordered import
"ISC", # implicit string concatenation
"LOG", # Logging stuff
"N", # pep 8 naming
"PERF", # SOme performance stuff
"PIE", # Some extra checks
"PL", # Pylint
"PTH", # Use pathlib
"PT", # Pytest style
"Q", # flake 8 quotes
"RET", # Return types
"RSE", # Unneeded exception parentheses
"RUF", # the ruff developer's own rules
"SIM", # Simplify
"S", # flake8-bandit, more secutiry checks
"T20", # Warn about prints
"TC", # Type checking
"TRY", # Error handling stuff
"UP", # Update syntax to newer versions
"W", # pycodestyle warnings
]
ignore = [
"D203", # incorrect-blank-line-before-class, Conflicts with D211
"D213", # multi-line-summary-second-line, Conflicts with D212
]
[tool.ruff.lint.per-file-ignores]
"packages/*/test_*/*" = [
"D", # We do not need to document the tests.
"TRY003", # Dont worry about big exceptions in tests
"S101", # Allow asserts in tests
]
"packages/hooks/**" = [
"TRY003", # Allow large exception messages in code cli scripting things
]
[tool.uv]
exclude-newer = "7 days"
[tool.uv.sources]
fsfe-website-build = { workspace = true }
fsfe-website-hooks = { workspace = true }
[tool.uv.workspace]
members = ["packages/*"]