-
-
Notifications
You must be signed in to change notification settings - Fork 635
/
pyproject.toml
238 lines (216 loc) · 7.05 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
227
228
229
230
231
232
233
234
235
236
237
238
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "xhtml2pdf"
authors = [
{name = "Dirk Holtwick", email = "dirk.holtwick@gmail.com"},
]
maintainers = [
{name = "Luis Zarate", email = "luisza14@gmail.com"},
{name = "Timo Brembeck", email = "opensource@timo.brembeck.email"}
]
description = "PDF generator using HTML and CSS"
keywords = ["PDF", "HTML", "HTML", "XML", "CSS"]
readme = "README.rst"
license = {file = "LICENSE.txt"}
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: OS Independent",
"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 :: Documentation",
"Topic :: Multimedia",
"Topic :: Office/Business",
"Topic :: Printing",
"Topic :: Text Processing",
"Topic :: Text Processing :: Filters",
"Topic :: Text Processing :: Fonts",
"Topic :: Text Processing :: General",
"Topic :: Text Processing :: Indexing",
"Topic :: Text Processing :: Markup",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: XML",
"Topic :: Utilities",
]
requires-python = ">=3.8"
dependencies = [
"arabic-reshaper>=3.0.0",
"html5lib>=1.1",
"Pillow>=8.1.1",
"pyHanko>=0.12.1",
"pyhanko-certvalidator>=0.19.5",
"pypdf>=3.1.0",
"python-bidi>=0.4.2",
"reportlab>=4.0.4,<4.1",
"svglib>=1.2.1",
]
dynamic = ["version"]
[project.urls]
Repository = "https://github.com/xhtml2pdf/xhtml2pdf"
"Bug tracker" = "https://github.com/xhtml2pdf/xhtml2pdf/issues"
Documentation = "https://xhtml2pdf.readthedocs.io/"
Changelog = "https://xhtml2pdf.readthedocs.io/en/latest/release-notes.html"
[project.optional-dependencies]
pycairo = [
"reportlab[pycairo]>=4.0.4,<4.1",
]
renderpm = [
"reportlab[renderpm]>=4.0.4,<4.1",
]
test = [
"tomli>=2.0.1; python_version<'3.11'",
"tox",
"coverage>=5.3"
]
docs = [
"sphinx>=6",
"sphinx-rtd-theme>=0.5.0",
"sphinxcontrib-pdfembed@git+https://github.com/SuperKogito/sphinxcontrib-pdfembed"
]
release = ["build", "twine"]
[project.scripts]
pisa = "xhtml2pdf.pisa:command"
xhtml2pdf = "xhtml2pdf.pisa:command"
[tool.setuptools.dynamic]
version = {attr = "xhtml2pdf.__version__"}
[tool.setuptools.packages.find]
include = ["xhtml2pdf*"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{3.8,3.9,3.10,3.11,3.12}
[testenv]
deps = coverage[toml]
commands =
python3 -c 'import sys;print(sys.version_info)'
python3 -c "from reportlab import Version; print('%s %s' % ('Reportlab Version', Version))"
coverage run -m unittest discover tests
coverage run -a testrender/testrender.py --nofail --only-errors
"""
[tool.coverage.run]
branch = true
source = ["xhtml2pdf"]
omit = ["/usr/share/*"]
[tool.coverage.report]
precision = 2
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
]
ignore_errors = true
[tool.coverage.html]
directory = "coverage_html_report"
[tool.black]
skip-magic-trailing-comma = true
preview = true
[tool.ruff]
preview = true
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
# "ANN", # flake8-annotations
# "BLE", # flake8-blind-except
# "CPY", # flake8-copyright
# "ERA", # eradicate
# "FIX", # flake8-fixme
# "INP", # flake8-no-pep420
# "PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib
# "T20", # flake8-print
# "TD", # flake8-todos
]
ignore = [
"ARG002", # Unused method argument
"B020", # Loop control variable overrides iterable it iterates
"COM812", # Trailing comma missing
"D1", # Missing docstrings
"D203", # 1 blank line required before class docstring
"D205", # blank link after summary
"D212", # Multi-line docstring summary should start at the first line
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood
"D404", # First word of the docstring should not be "This"
"D415", # First line should end with a period, question mark, or exclamation point
"E203", # Whitespace before punctuation
"E501", # Line length
"N801", # Class name should use CapWords convention
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"N806", # Variable lowercase
"N815", # Variable in class scope should not be mixedCase
"N816", # Variable in global scope should not be mixedCase
"PLR0904", # Too many public methods
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLW2901", # `for` loop variable overwritten by assignment target
"SLF001", # Private member accessed
]
[tool.mypy]
disable_error_code = [
"method-assign",
]