forked from lektor/lektor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
221 lines (194 loc) · 4.76 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
[build-system]
requires = ["hatchling>=1.13.0,<2.0.0", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "Lektor"
description = "A static content management system."
dynamic = ["version"]
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Armin Ronacher", email = "armin.ronacher@active-4.com" },
]
urls.Homepage = "https://www.getlektor.com/"
urls.Source = "https://github.com/lektor/lektor/"
urls.Documentation = "https://www.getlektor.com/docs/"
urls.Changelog = "https://github.com/lektor/lektor/blob/master/CHANGES.md"
classifiers = [
"Framework :: Lektor",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"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",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = [
"Babel",
"click>=6.0",
"Flask",
"inifile>=0.4.1",
"Jinja2>=3.0",
"MarkupSafe",
"marshmallow",
"marshmallow_dataclass>=8.5.9",
"mistune>=0.7.0,<3",
"Pillow>=6",
"pip",
"python-slugify",
"pytz; python_version<'3.9'", # favor zoneinfo for python>=3.9
"requests",
"tzdata; python_version>='3.9' and sys_platform == 'win32'",
"watchfiles>=0.12",
"Werkzeug>=2.1.0",
]
optional-dependencies.ipython = [
"ipython",
"traitlets",
]
[project.scripts]
lektor = "lektor.cli:main"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build]
include = [
"/lektor",
]
artifacts = [
"/lektor/admin/static",
]
[tool.hatch.build.targets.sdist]
include = [
"/lektor",
"/build_frontend.py",
"/CHANGES.md",
"/tests",
"/tox.ini",
]
[tool.hatch.build.hooks.custom]
path = "build_frontend.py"
################################################################
#
# pytest
#
[tool.pytest.ini_options]
norecursedirs = ["venv", ".tox", ".git", "node_modules"]
addopts = "--strict-markers"
markers = [
"requiresinternet: marks tests requiring an internet connection",
"slowtest: marks particularly slow tests that do not need to be run for every testenv variant",
]
################################################################
#
# coverage
#
[tool.coverage.run]
source_pkgs = [
"lektor",
]
omit = [
# test_pluginsystem.py has a test that installs a Lektor plugin from PyPI
# into a pytest temporary directory
"*/pytest-*/*",
]
parallel = true
[tool.coverage.paths]
paths = [
"lektor",
".tox/py*/*/lektor",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
'^\s*\.\.\.\s*$',
'^\s*raise\s+NotImplementedError\(\)\s*$',
'^if TYPE_CHECKING:\s*',
]
################################################################
#
# pylint
#
[tool.pylint.main]
ignore = [".git"]
load-plugins = "pylint.extensions.no_self_use"
[tool.pylint.format]
max-line-length = 91
max-module-lines = 2000
[tool.pylint.design]
max-attributes = 20
max-locals = 30
max-branches = 20
max-nested-blocks = 8
max-returns = 8
[tool.pylint."messages control"]
disable = [
"redundant-u-string-prefix",
"consider-using-f-string",
"missing-docstring",
"unused-argument",
"redefined-outer-name",
"invalid-name",
"protected-access",
"fixme",
"broad-except",
"redefined-builtin",
"too-many-arguments",
"too-few-public-methods",
"too-many-public-methods",
"duplicate-code",
"unnecessary-dunder-call",
]
[tool.mypy]
files = ["$MYPY_CONFIG_FILE_DIR/lektor"]
plugins = [
"marshmallow_dataclass.mypy",
]
show_error_codes = true
error_summary = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
strict = true
#implicit_reexport = true
# We have just started to add annotation. For now, ignore all errors
# by default. (This can be disabled on a per-package or per-module
# basis in the overrides.)
ignore_errors = true
[[tool.mypy.overrides]]
# Packages and modules we want to check
module = [
"lektor.assets",
"lektor.constants",
"lektor.devserver",
"lektor.packages",
"lektor.admin.*",
"lektor.imagetools.*",
"test_packages",
]
ignore_errors = false
[[tool.mypy.overrides]]
module = [
"lektor.packages",
]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"lektor.admin.*",
"lektor.devserver",
"lektor.imagetools.*",
"lektor.packages",
]
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = [
"lektor.admin.*",
]
warn_return_any = false