forked from ctb/twill-legacy
-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
226 lines (205 loc) · 5.82 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
[project]
name = "twill"
version = "3.3"
description = "A web browsing and testing language"
keywords = ["web", "testing", "browsing", "automation"]
readme = "README.md"
license = {file = "LICENSE.txt"}
authors = [
{name = "C. Titus Brown"},
{name = "Ben R. Taylor"},
{name = "Christoph Zwerschke"}
]
maintainers = [
{name = "Christoph Zwerschke", email="[email protected]"}
]
classifiers = [
'Development Status :: 6 - Mature',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'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',
'Programming Language :: Other Scripting Engines',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Testing'
]
requires-python = ">=3.8"
dependencies = [
"lxml >=5.2, <6",
"httpx >=0.27.0, <1",
"pyparsing >=3.1, <4",
]
[project.optional-dependencies]
docs = [
"sphinx >=8.1, <9",
"sphinx_rtd_theme >=3, <4"
]
tidy = [
"pytidylib >=0.3, <0.4"
]
tests = [
"tox >=4, <5",
"pytest >=8, <9",
"pytidylib >=0.3, <0.4",
"flask >=3.0, <4",
]
[project.scripts]
twill = "twill.shell:main"
twill-fork = "twill.fork:main"
[project.urls]
Homepage = "https://github.com/twill-tools/twill"
Issues = "https://github.com/twill-tools/twill/issues"
Documentation = "https://twill-tools.github.io/twill/"
Source = "https://github.com/twill-tools/twill"
ChangeLog = "https://twill-tools.github.io/twill/changelog.html"
Download = "https://pypi.org/project/twill/"
[tool.setuptools.package-data]
"twill" = ["py.typed"]
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = [ "tests" ]
[tool.mypy]
python_version = 3.12
check_untyped_defs = true
no_implicit_optional = true
strict_optional = false
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = false
[tool.pyright]
reportIncompatibleVariableOverride = false
reportMissingTypeArgument = false
reportUnknownArgumentType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnnecessaryIsInstance = false
reportUnknownVariableType = false
ignore = ["**/test_*"] # test functions
[tool.black]
line-length = 79
[tool.ruff]
line-length = 79
target-version = "py38"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"COM", # flake8-commas
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle
"EM", # flake8-errmsg
"ERA", # eradicate
"EXE", # flake8-executable
"F", # Pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SLF", # flake8-self
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"ANN002", "ANN003", # no type annotations needed for args and kwargs
"ANN101", "ANN102", # no type annotation for self and cls needed
"ANN401", # allow explicit Any
"COM812", # allow trailing commas for auto-formatting
"D203", # no blank line before class docstring
"D213", # multi-line docstrings should not start at second line
"EM101", "EM102", # allows exceptions with literal and f-strings
"ISC001", # allow string literal concatenation for auto-formatting
"PLW0603", # allow global statements
"PTH123", # allow builtin-open
"TRY003", # allow specific messages outside the exception class
"TRY301", # allow raise
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
[tool.ruff.lint.mccabe]
max-complexity = 25
[tool.ruff.lint.pylint]
max-args = 12
max-branches = 25
max-returns = 7
max-statements = 75
[tool.ruff.lint.per-file-ignores]
"src/twill/commands.py" = [
"A001", # may shadow builtins
"D400", "D401", "D415", # allow more flexible docstrings
"S102" # allow use of exec
]
"src/twill/fork.py" = [
"T201" # allow using print()
]
"src/twill/parse.py" = [
"PGH001", "S307" # allow evaluation of expressions
]
"src/twill/extensions/*" = [
"D400", "D401", "D415", # allow more flexible docstrings
]
"docs/*" = [
"A001", # may shadow builtins
"INP001", # allow stand-alone scripts
"ERA001", # allow commented-out code
]
"extras/*" = [
"ANN", # no annotations needed
"INP001", # allow stand-alone scripts
]
"tests/server.py" = [
"T201", # allow using print()
]
"tests/test_*" = [
"D", # do not require docstrings
"ANN201", # do not require return types
"S101", # allow assert statements
"PLR2004", # allow magic values
]
[tool.pylint.messages_control]
disable = [
"method-hidden",
"missing-module-docstring", # test modules
"redefined-outer-name",
"unused-variable", # test functions
]
[build-system]
requires = ["setuptools >=69"]
build-backend = "setuptools.build_meta"