Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
243 lines (216 loc) · 8.68 KB
/
Copy pathpyproject.toml
File metadata and controls
243 lines (216 loc) · 8.68 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
[build-system]
build-backend = "uv_build"
requires = ["uv_build>=0.9.10"]
[project]
authors = [
{email = "dev.act.kyle@gmail.com", name = "kyleking"},
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"mdformat >= 1.0.0",
"mdformat-footnote >= 0.1.3",
"mdformat-front-matters >= 2.0.0",
"mdformat-gfm >= 1.0.0",
"mdit-py-plugins >= 0.6.1",
"more-itertools >= 11.1.0",
]
description = "An mdformat plugin for mkdocs and Material for MkDocs"
keywords = ["markdown", "markdown-it", "mdformat", "mdformat_plugin_template"]
license = "MIT"
license-files = ["LICENSE"]
name = "mdformat_mkdocs"
readme = "README.md"
requires-python = ">=3.10.0"
version = "6.0.2"
[project.entry-points."mdformat.parser_extension"]
mkdocs = "mdformat_mkdocs"
[project.optional-dependencies]
recommended = [
# Keep in-sync with README
"mdformat-beautysh >= 1.0.0",
"mdformat-config >= 0.2.1",
"mdformat-ruff >= 0.1.3",
"mdformat-simple-breaks >= 0.1.0",
"mdformat-web >= 0.2.0",
"mdformat-wikilink >= 0.3.0",
# Patches https://github.com/lovesegfault/beautysh/issues/248 for Python 3.12
"setuptools",
]
recommended-mdsf = [
# Keep in-sync with README
"mdformat-hooks >= 0.1.0",
"mdformat-simple-breaks >= 0.1.0",
"mdformat-wikilink >= 0.3.0",
]
test = [
"beartype >= 0.22.9",
"hypothesis >= 6.100.0",
"pytest >= 9.1.1",
"pytest-beartype >= 0.2.0",
"pytest-cov >= 7.1.0",
"pytest-timeout >= 2.4.0",
"syrupy >= 5.5.3",
]
[project.urls]
"Bug Tracker" = "https://github.com/kyleking/mdformat-mkdocs/issues"
"Changelog" = "https://github.com/kyleking/mdformat-mkdocs/releases"
homepage = "https://github.com/kyleking/mdformat-mkdocs"
[tool.commitizen]
tag_format = "v${version}"
version = "6.0.2"
version_files = ["mdformat_mkdocs/__init__.py", "pyproject.toml:^version"]
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
enable_error_code = ["ignore-without-code", "possibly-undefined", "redundant-expr", "truthy-bool"]
extra_checks = true
files = ["mdformat_mkdocs", "tests"]
no_implicit_reexport = true
python_version = "3.10"
show_column_numbers = true
show_error_codes = true
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pyright]
include = ["mdformat_mkdocs", "tests"]
pythonVersion = "3.10"
[tool.pytest-watcher]
ignore_patterns = []
now = true
patterns = ["*.ambr", "*.md", "*.py"]
runner = "tox"
# PLANNED: requires support for TYPE_CHECKING https://github.com/beartype/beartype/issues/477
# runner_args = ["-e", "test", "--", "--exitfirst", "--failed-first", "--new-first", "-vv", "--beartype-packages=mdformat_mkdocs"]
runner_args = ["-e", "test", "--", "--exitfirst", "--failed-first", "--new-first", "-vv"]
[tool.ruff]
# Docs: https://github.com/charliermarsh/ruff
# Tip: poetry run python -m ruff --explain RUF100
line-length = 88
target-version = 'py310'
[tool.ruff.lint]
ignore = [
'assert', # Use of `assert` detected
'blind-except', # Do not catch blind exception: `Exception`
'boolean-type-hint-positional-argument', # Boolean-typed positional argument in function definition
'docstring-missing-returns', # `return` is not documented in docstring
'docstring-missing-yields', # `yield` is not documented in docstring
'incorrect-blank-line-before-class', # "1 blank line required before class docstring" (Conflicts with D211)
'invalid-argument-name', # Argument name `startLine` should be lowercase
'invalid-todo-tag', # Invalid TODO tag: `FIXME`
'line-contains-fixme', # Line contains FIXME
'line-contains-hack', # Line contains HACK
'line-contains-todo', # Line contains TODO
'line-too-long', # Line too long (89 > 88)
'missing-copyright-notice', # Missing copyright notice at top of file
'missing-todo-author', # Missing author in TODO; try: `# TODO(<author_name>): ...`
'missing-todo-link', # Missing issue link on the line following this TODO
'missing-trailing-comma', # missing-trailing-comma
'missing-type-args', # Missing type annotation for `*args`
'missing-type-kwargs', # Missing type annotation for `**kwargs`
'mixed-case-variable-in-class-scope', # Variable `lineMax` in class scope should not be mixedCase
'multi-line-summary-second-line', # "Multi-line docstring summary should start at the second line" (Conflicts with D212)
'raise-vanilla-args', # Avoid specifying long messages outside the exception class
'raw-string-in-exception', # Exception must not use a string literal, assign to variable first
'too-many-arguments', # Too many arguments in function definition (6 > 5)
'typing-only-standard-library-import', # Move standard library import `argparse` into a type-checking block (for beartype)
'typing-only-third-party-import', # Move third-party import `mdformat.renderer.typing.Postprocess` into a type-checking block (for beartype)
]
preview = true
select = ['ALL']
unfixable = [
'commented-out-code', # Commented out code
]
[tool.ruff.lint.isort]
known-first-party = ['mdformat_mkdocs', 'tests']
[tool.ruff.lint.per-file-ignores]
'__init__.py' = [
'undocumented-public-package', # Missing docstring in public package
]
'tests/*.py' = [
'assert', # Use of `assert` detected
'import-private-name', # Private name import `_<>` from external module
'missing-return-type-private-function', # Missing return type annotation for private function `test_make_diffable`
'missing-return-type-undocumented-public-function', # Missing return type annotation for public function
'missing-type-function-argument', # Missing type annotation for function argument
'pytest-missing-fixture-name-underscore', # flake8-pytest-style: fixture does not return
'undocumented-public-function', # Missing docstring in public function
'undocumented-public-module', # Missing docstring in public module
'unused-function-argument', # Unused function argument: `line`
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.tomlsort]
all = true
in_place = true
trailing_comma_inline_array = true
[tool.tomlsort.overrides."tool.pytest-watcher.*"]
inline_arrays = false
[tool.tomlsort.overrides."tool.tox.env.*"]
inline_arrays = false
[tool.tox]
# Docs: https://tox.wiki/en/4.23.2/config.html#core
basepython = ["py310", "py314"]
env_list = ["hook-min", "prek", "ruff", "test-min", "type"]
isolated_build = true
requires = ["tox>=4.32.0"]
skip_missing_interpreters = false
[tool.tox.env.canary]
basepython = ["py314"]
changedir = "{tox_root}"
commands = [["python", "scripts/canary.py", {default = [], extend = true, replace = "posargs"}]]
description = "Run mdformat idempotency checks against real downstream repos configured in scripts/canary_repos.json. Optionally specify: '-- some-repo another-repo' to test a subset."
skip_install = false
[tool.tox.env.cz]
basepython = ["py314"]
commands = [["cz", "bump", {default = [], extend = true, replace = "posargs"}]]
commands_pre = [["tox", "-e", "canary"]]
deps = "commitizen>=4.10.0"
description = "Bump version using commitizen. Optionally specify: '-- --increment MAJOR|MINOR|PATCH' or '-- --dry-run'"
skip_install = true
[tool.tox.env."hook-min"]
basepython = ["py310"]
commands = [["prek", "run", "--config=.pre-commit-test.yaml", "--all-files", {default = ["--show-diff-on-failure", "--verbose"], extend = true, replace = "posargs"}]]
deps = "prek>=0.2.17"
[tool.tox.env.prek]
basepython = ["py314"]
commands = [["prek", "run", "--all-files", {default = [], extend = true, replace = "posargs"}]]
deps = "prek>=0.2.17"
skip_install = true
[tool.tox.env.ruff]
basepython = ["py314"]
commands = [
["ruff", "check", ".", "--fix", {default = [], extend = true, replace = "posargs"}],
["ruff", "format", "."],
]
deps = "ruff>=0.14.5"
description = "Optionally, specify: '-- --unsafe-fixes'"
skip_install = true
[tool.tox.env.test]
basepython = ["py314"]
commands = [["pytest", "--cov=mdformat_mkdocs", {default = [], extend = true, replace = "posargs"}]]
# PLANNED: requires support for TYPE_CHECKING https://github.com/beartype/beartype/issues/477
# description = "Optionally, specify: '-- --exitfirst --failed-first --new-first -vv --beartype-packages=mdformat_mkdocs"
description = "Optionally, specify: '-- --exitfirst --failed-first --new-first -vv"
extras = ["test"]
[tool.tox.env."test-min"]
basepython = ["py310"]
commands = [["pytest", "--cov=mdformat_mkdocs"]]
extras = ["test"]
[tool.tox.env.type]
basepython = ["py314"]
commands = [["mypy", "./mdformat_mkdocs", {default = [], extend = true, replace = "posargs"}]]
deps = ["mypy>=1.18.2"]
[tool.tox.env_run_base]
# Validates that commands are set
commands = [["error-commands-are-not-set"]]
[tool.uv.build-backend]
module-root = ""