-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathpyproject.toml
More file actions
206 lines (186 loc) · 5.44 KB
/
Copy pathpyproject.toml
File metadata and controls
206 lines (186 loc) · 5.44 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
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
205
206
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[dependency-groups]
dev = [
"tox-uv>=1.35.2"
]
docs = [
"furo",
"sphinx",
"sphinx-autodoc-typehints"
]
lint = [
"pre-commit",
"ruff>=0.15.17"
]
test = [
"coverage>=7.14.1",
"pytest>=9.0.3",
"vcrpy>=8.1.1"
]
type = [
"pyright>=1.1.410",
{include-group = "test"}
]
[project]
authors = [{email = "bbzbryce@gmail.com", name = "Bryce Boe"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Typing :: Typed"
]
dependencies = [
"requests>=2.34.2,<3.0"
]
description = "Low-level communication layer for PRAW 4+."
dynamic = ["version"]
keywords = ["praw", "reddit", "api"]
license = {file = "LICENSE.txt"}
maintainers = [
{email = "bbzbryce@gmail.com", name = "Bryce Boe"},
{email = "lilspazjoekp@gmail.com", name = "Joel Payne"}
]
name = "prawcore"
readme = "README.rst"
requires-python = ">=3.10"
[project.urls]
"Documentation" = "https://prawcore.readthedocs.io/"
"Issue Tracker" = "https://github.com/praw-dev/prawcore/issues"
"Source Code" = "https://github.com/praw-dev/prawcore"
[tool.coverage.report]
exclude_lines = [
"@abstract",
"@overload",
"if TYPE_CHECKING:",
"pragma: no cover"
]
fail_under = 100
[tool.hatch.version]
path = "prawcore/__init__.py"
[tool.pyright]
include = ["prawcore"]
pythonVersion = "3.10"
typeCheckingMode = "strict"
[tool.pytest.ini_options]
testpaths = "tests"
[tool.ruff]
include = ["*.py"]
line-length = 120
preview = true
[tool.ruff.lint]
ignore = [
"A002", # shadowing built-in
"ANN202", # missing return type for private method
"C901", # function is too complex
"COM812", # trailing comma missing (conflicts with the formatter)
"CPY001", # missing copyright notice
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"DOC201", # `return` not documented in docstring
"DOC402", # `yield` not documented in docstring
"DOC501", # `raise` not documented in docstring
"E501", # line-length
"ISC001", # single-line implicit string concatenation (conflicts with the formatter)
"PLR0913", # too many arguments
"RUF067", # `__init__` module should only contain docstrings and re-exports
"SLF001" # private member accessed (pyright's reportPrivateUsage covers source)
]
select = ["ALL"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
suppress-dummy-args = true
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"docs/conf.py" = ["A001", "D100", "DTZ002", "INP001"]
"examples/*.py" = ["ANN", "ARG", "D", "INP", "PLR", "S", "T20"]
"tests/**/*.py" = [
"A", # builtin shadowing
"ANN", # type annotations
"ARG", # unused arguments (pytest fixtures)
"B", # bugbear (asserts attribute access, loop vars)
"C4", # comprehensions
"D", # docstrings
"DTZ", # naive datetimes
"EM", # exception message strings
"ERA", # commented-out code
"FBT", # boolean traps
"FIX", # TODO/FIXME comments
"INP", # implicit namespace package
"ISC", # implicit string concatenation
"N", # naming
"PLC", # pylint convention
"PLR", # pylint refactor (no-self-use, magic values, self-comparison)
"PLW", # pylint warning
"PT", # pytest style
"PTH", # use pathlib
"PYI", # stub-only rules
"RET", # unnecessary assignment before return
"RSE", # raise
"RUF", # ruff-specific
"S", # bandit (assert, pickle, hardcoded secrets)
"SIM", # simplify
"SLF", # private member access
"T20", # print
"TID", # relative imports
"TRY", # tryceratops (long exception messages)
"UP" # pyupgrade (percent formatting)
]
[tool.tomlsort]
sort_inline_tables = true
sort_table_keys = true
[tool.tox]
envlist = ["py310", "py311", "py312", "py313", "py314", "docs", "pre-commit", "type"]
minversion = "4.22"
[tool.tox.env.docs]
base_python = ["py314"]
commands = [
["sphinx-build", "-W", "--keep-going", "-n", "docs/", "{env_tmp_dir}/html"]
]
dependency_groups = ["docs"]
description = "build docs with sphinx"
runner = "uv-venv-lock-runner"
[tool.tox.env.linkcheck]
base_python = ["py314"]
commands = [
["sphinx-build", "--keep-going", "-b", "linkcheck", "docs/", "{env_tmp_dir}/linkcheck"]
]
dependency_groups = ["docs"]
description = "check documentation for broken external links"
runner = "uv-venv-lock-runner"
[tool.tox.env.pre-commit]
commands = [
["pre-commit", "run", "--all-files"]
]
dependency_groups = ["lint"]
description = "run pre-commit on code base"
pass_env = ["SKIP"]
runner = "uv-venv-lock-runner"
[tool.tox.env.type]
commands = [["pyright"]]
dependency_groups = ["type"]
description = "run type check on code base"
runner = "uv-venv-lock-runner"
[tool.tox.env_run_base]
commands = [
["coverage", "run", "--source", "prawcore", "--module", "pytest", "{posargs}"],
["coverage", "report", "-m", "--fail-under=100"]
]
dependency_groups = ["test"]
description = "Run test under {base_python}"
pass_env = ["ENSURE_NO_UNUSED_CASSETTES"]
runner = "uv-venv-lock-runner"