forked from vokimon/markdown-customblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
255 lines (231 loc) · 7.09 KB
/
Copy pathpyproject.toml
File metadata and controls
255 lines (231 loc) · 7.09 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
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
[build-system]
requires = ["uv_build>=0.9.8,<0.10.0"]
build-backend = "uv_build"
[project]
name = "markdown-customblocks"
version = "1.5.3"
description = 'Python Markdown extension to add custom parametrizable and nestable blocks'
authors = [
{ name = "David García Garzón", email = "voki@canvoki.net" },
]
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = ["markdown", "extension", "customblocks", "admonitions", "container", "figure", "map", "youtube", "vimeo", "twitter", "facebook", "instagram", "verkami", "goteo", "mastodon", "wikipedia", "peertube"]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Intended Audience :: Other Audience',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'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 :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Filters',
'Topic :: Text Processing :: Markup :: HTML',
]
dependencies = [
'markdown',
'yamlns>=0.11', # supports assertNsContains
'beautifulsoup4',
'decorator',
'geocoder', # map
'urllib3<2', # conflicts with requests
'python-magic', # figure embed
'pillow',
'requests',
]
[dependency-groups]
test = [
'pytest', # testing
'pytest-cov', # testing
'responses', # testing
]
docs = [
'mkdocs', # docsuv sync -upgrade
'mkdocs-material', # docs
]
[tool.uv]
default-groups = ["test", "docs"]
[tool.uv.build-backend]
module-name = "customblocks"
module-root = ""
[project.urls]
Homepage = "https://vokimon.github.io/markdown-customblocks"
Documentation = "https://vokimon.github.io/markdown-customblocks"
Repository = "https://github.com/vokimon/markdown-customblocks"
Changelog = "https://github.com/vokimon/markdown-customblocks/blob/master/CHANGES.md"
[project.entry-points."markdown.extensions"]
customblocks = "customblocks:CustomBlocksExtension"
[project.entry-points."markdown.customblocks.generators"]
attention = "customblocks.generators:admonition"
caution = "customblocks.generators:admonition"
danger = "customblocks.generators:admonition"
error = "customblocks.generators:admonition"
hint = "customblocks.generators:admonition"
important = "customblocks.generators:admonition"
note = "customblocks.generators:admonition"
tip = "customblocks.generators:admonition"
warning = "customblocks.generators:admonition"
youtube = "customblocks.generators:youtube"
peertube = "customblocks.generators:peertube"
vimeo = "customblocks.generators:vimeo"
verkami = "customblocks.generators:verkami"
goteo = "customblocks.generators:goteo"
mastodon = "customblocks.generators:mastodon"
twitter = "customblocks.generators:twitter"
facebook = "customblocks.generators:facebook"
instagram = "customblocks.generators:instagram"
map = "customblocks.generators:map"
linkcard = "customblocks.generators:linkcard"
figure = "customblocks.generators:figure"
wikipedia = "customblocks.generators:wikipedia"
[tool.coverage.run]
relative_files = true
branch = true
omit = ["**/*test.py"]
[tool.pytest.ini_options]
addopts = "--cov=customblocks"
testpaths = ["tests"]
[tool.interrogate]
ignore-init-method = true
ignore-init-module = false
ignore-magic = true
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = false
ignore-nested-functions = true
ignore-nested-classes = true
ignore-setters = false
fail-under = 90
exclude = ["setup.py", "docs", "build"]
ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
verbose = 0
quiet = false
whitelist-regex = []
color = true
[tool.black]
line-length = 119
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 119
[tool.ruff.lint]
preview = true
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"B", # flake8-bugbear
"BLE", # flake8-blind except
"C4", # flake8-comprehensions
"C90", # McCabe complexity
"D", # pydocstyle
"E", # pycodestyle errors
"EXE", # flake8-executable
"F", # pyflakes
"I", # isort
"N", # PEP8 naming
"NPY", # NumPy-specific rules
"PD", # Pandas-vet
"PERF", # Perflint
"PGH", # PyGrep hooks
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLW", # Pylint warnings
"Q", # flake8-quotes
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"TCH", # Flake8 type-checking
"W", # pycodestyle warnings
]
ignore = [
"ANN002", # missing-type-args
"ANN003", # missing-type-kwargs
"ANN204", # missing-return-type-special-method
"ANN401", # any-type
"D105", # undocumented-magic-method
"D106", # undocumented-public-nested-class
"D107", # undocumented-public-init
"D200", # fits-on-one-line
"D212", # multi-line-summary-first-line
"N802",
"N812", # lowercase-imported-as-non-lowercase
"N815", # mixed-case-variable-in-class-scope
"PD011", # pandas-use-of-dot-values
"PLC0415", # import-outside-toplevel
"PLW0108", # unnecessary-lambda
"PLW1641", # eq-without-hash
"S101", # assert
"S104", # hardcoded-bind-all-interfaces
"S404", # suspicious-subprocess-import
"S602", # subprocess-popen-with-shell-equals-true
]
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
typing-modules = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"ANN001", # missing-type-function-argument
"ANN002", # missing-type-args
"ANN003", # missing-type-kwargs
"ANN201", # missing-return-type-undocumented-public-function
"ANN202", # missing-return-type-private-function
"PGH003", # blanket-type-ignore
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"PLW0603", # global-statement
"S101", # assert
"S105", # hardcoded-password-string
"S106", # hardcoded-password-func-arg
"TRY003", # raise-vanilla-args
"TRY201", # verbose-raise
"TRY301", # raise-within-try
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
order-by-type = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pydoclint]
style = "google"
exclude = '\.git|tests'
require-return-section-when-returning-nothing = false
arg-type-hints-in-docstring = false
check-return-types = false
skip-checking-raises = true
quiet = true