-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
204 lines (193 loc) · 4.8 KB
/
pyproject.toml
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[project]
name = "pytoil"
version = "0.41.0"
description = "CLI to automate the development workflow."
readme = "README.md"
keywords = [
"automation",
"cli",
"developer-tools",
"python",
]
license = { text = "Apache Software License 2.0" }
maintainers = [
{ name = "Tom Fleet" },
{ email = "tomfleet2018@gmail.com" },
]
authors = [
{ name = "Tom Fleet" },
{ email = "tomfleet2018@gmail.com" },
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: OS Independent",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"click==8.1.8",
"cookiecutter==2.6",
"copier==9.4.1",
"httpx==0.28.1",
"humanize==4.11",
"pydantic==2.10.4",
"pyyaml==6.0.2",
"questionary==2.0.1",
"rich==13.9.4",
"rtoml==0.12",
"thefuzz[speedup]==0.22.1",
"virtualenv==20.28",
]
urls.Documentation = "https://FollowTheProcess.github.io/pytoil/"
urls.Homepage = "https://github.com/FollowTheProcess/pytoil"
urls.Source = "https://github.com/FollowTheProcess/pytoil"
scripts.pytoil = "pytoil.cli.root:main"
[tool.ruff]
line-length = 120
lint.select = [
"A", # Don't shadow builtins
"ANN", # Type annotations
"ARG", # Unused arguments
"B", # Flake8 bugbear
"BLE", # No blind excepts
"C4", # Flake8 comprehensions
"C90", # Complexity
# https://github.com/charliermarsh/ruff#supported-rules
"E", # Pycodestyle errors
"ERA", # Commented out code
"F", # Pyflakes errors
"I", # Isort
"INP", # No implicit namespace packages (causes import errors)
"N", # PEP8 naming
"PGH", # Pygrep hooks
"PIE", # Flake8 pie
"PT", # Pytest style
"PTH", # Use pathlib over os.path
"RET", # Function returns
"RSE", # When raising an exception chain, use from
"RUF", # Ruff specific rules
"S", # Bandit (security)
"SIM", # Simplify
"SLF", # Flake8-self, private member access
"T20", # No print statements
"TCH", # Stuff for typing is behind an if TYPE_CHECKING block
"UP", # All pyupgrade rules
"W", # Pycodestyle warnings
"YTT", # Flake8 2020
]
lint.ignore = [
"ANN101", # Missing type annotation for self in method
"S105", # Hardcoded passwords (lots of false positives)
"S106", # Hardcoded passwords (again?)
"S603", # Subprocess calls
]
lint.per-file-ignores."conftest.py" = [
"TCH", # Conftest is only run for tests (with dev dependencies)
]
lint.per-file-ignores."tests/**/*.py" = [
"ARG001", # Thinks pytest fixtures are unused arguments
"D104", # Missing docstring in __init__.py in tests (which is fine)
"FBT001", # Tests are allowed positional bools (fixtures etc.)
"S", # Security stuff in tests is fine
"S101", # Assert is allowed in tests (obviously)
"SLF001", # Private member access in tests is fine
"TCH", # Tests will be run with dev dependencies so we don't care
]
lint.isort.required-imports = [
"from __future__ import annotations",
]
lint.mccabe.max-complexity = 15
[tool.codespell]
skip = "*.svg"
ignore-words-list = "ines,Ines"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
]
xfail_strict = true
filterwarnings = [
"error",
"ignore::DeprecationWarning", # DeprecationWarning: read_binary is deprecated. Use files() instead. Comes from virtualenv
]
log_cli_level = "info"
pythonpath = [
"src",
]
testpaths = [
"tests",
]
[tool.coverage.run]
plugins = [
"covdefaults",
]
omit = [
"src/pytoil/cli/*.py",
"src/pytoil/starters/base.py",
"src/pytoil/exceptions.py",
]
[tool.coverage.report]
fail_under = 95
exclude_lines = [
"def __repr__",
"except ImportError",
]
[tool.mypy]
files = [
"**/*.py",
]
python_version = "3.9"
ignore_missing_imports = true
strict = true
pretty = true
disallow_untyped_decorators = false
plugins = "pydantic.mypy"
show_error_codes = true
warn_unreachable = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
[tool.uv]
dev-dependencies = [
"covdefaults",
"coverage[toml]",
"freezegun",
"mkdocs",
"mkdocs-material",
"mypy",
"nox",
"pre-commit",
"pytest",
"pytest-clarity",
"pytest-cov",
"pytest-httpx",
"pytest-mock",
"pytest-randomly",
"ruff",
"types-click",
"types-pyyaml",
]