-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (127 loc) · 3.88 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (127 loc) · 3.88 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
[project]
name = "python-template"
dynamic = ["version"]
readme = "README.md"
authors = [
{ name = "Cassidy Prather", email = "pratherea@gmail.com" }
]
requires-python = ">=3.14, < 3.15"
dependencies = [
"defusedxml >= 0.7.1, < 1",
"trio >= 0.34.0, < 1",
]
[project.scripts]
python-template = "python_template.cli:main"
[dependency-groups]
dev = [
"ruff >= 0.16.5, < 1",
"ty >= 0.0.75, < 1",
"pytest >= 9.1.1, < 10",
"pytest-cov >= 7.1.0, < 8",
"gcovr >= 8.6, < 9",
"build >= 1.5.0, < 2",
"twine >= 7.0.0, < 8",
"pytest-trio >= 0.8.0, < 1",
"requests >= 2.34.2, < 3",
]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
fallback-version = "0.1.0"
[tool.hatch.build.hooks.vcs]
version-file = "src/python_template/_version.py"
[tool.uv]
exclude-newer = "7d"
[tool.uv.exclude-newer-package]
defusedxml = "1d"
ruff = "2d"
ty = "1d"
[tool.ruff]
extend-exclude = ["src/python_template/_version.py"]
[tool.ruff.lint]
preview = true # I'm not a coward!
select = [
"AIR", # airflow
"ERA", # eradicate
"FAST", # FastAPI
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FIX", # flake8-fixme
"FA", # flake8-future-annotations
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-PIE
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TID", # flake8-tidy-imports
"TD", # flake8-todos
"TC", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"FLY", # flynt
"I", # isort
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"N", # pep8-naming
"PERF", # Perflint
"E", # pycodestyle error
"W", # pycodestyle warning
"DOC", # pydoclint
"D", # pydocstyle
"F", # pyflakes
"PGH", # pygrep-hooks
"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLR", # Pylint Refactor
"PLW", # Pylint Warning
"UP", # pyupgrade
"FURB", # refurb
"RUF", # ruff-specific rules
"TRY", # tryceratops
]
ignore = [
"D10", # Undocumented stuff (not everything needs a docblock you dumb little [___])
"incorrect-blank-line-before-class", # Conflicts with `blank-line-before-class`
"multi-line-summary-second-line", # Conflicts with `multi-line-summary-first-line`
"docstring-missing-returns", # Rule is broken and doesn't detect :return: clauses
"docstring-missing-exception", # Doesn't detect :raises: clauses and fails to ignore abstract
"raw-string-in-exception", # Doesn't account for custom constructors
"PLR09", # Complexity begets defects, and these rules promote Complexity
"too-many-nested-blocks", # Redundant with max line width
"no-self-use", # Rule is broken (doesn't work for implementations of abstract)
"magic-value-comparison", # Magic values aren't always bad. Sometimes, fewer lines are nice
"missing-trailing-comma", # Broken, see: https://github.com/astral-sh/ruff/issues/9216
"error-instead-of-exception", # ??? https://docs.python.org/3/library/logging.html#logging-levels
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"assert", # Allow `assert` in tests
]
[tool.ruff.format]
preview = true # No cowards allowed!