generated from executablebooks/mdformat-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
184 lines (160 loc) · 5.99 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
[build-system]
build-backend = "flit_core.buildapi"
requires = ["flit_core >=3.9.0,<4"]
[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 == 0.7.18",
"mdit-py-plugins >= 0.4.1",
]
dynamic = ["description", "version"]
keywords = ["markdown", "markdown-it", "mdformat", "mdformat_plugin_template"]
name = "mdformat_admon"
readme = "README.md"
requires-python = ">=3.9.0"
[project.entry-points."mdformat.parser_extension"]
admon = "mdformat_admon"
[project.optional-dependencies]
test = [
"pytest >= 8.3.4",
"pytest-beartype >= 0.1.1",
"pytest-cov >= 6.0.0",
]
[project.urls]
"Bug Tracker" = "https://github.com/kyleking/mdformat-admon/issues"
"Changelog" = "https://github.com/kyleking/mdformat-admon/releases"
homepage = "https://github.com/kyleking/mdformat-admon"
[tool.flit.sdist]
exclude = [".github/", "tests/"]
include = []
[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_admon", "tests"]
no_implicit_reexport = true
python_version = "3.9"
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_admon", "tests"]
pythonVersion = "3.9"
[tool.pytest-watcher]
ignore_patterns = []
now = true
patterns = ["*.md", "*.py"]
runner = "tox"
runner_args = ["-e", "py312-test", "--", "--exitfirst", "--failed-first", "--new-first", "-vv", "--beartype-packages=mdformat_admon"]
[tool.ruff]
# Docs: https://github.com/charliermarsh/ruff
# Tip: poetry run python -m ruff --explain RUF100
line-length = 88
target-version = 'py39'
[tool.ruff.lint]
ignore = [
'ANN002', # Missing type annotation for `*args`
'ANN003', # Missing type annotation for `**kwargs`
'BLE001', # Do not catch blind exception: `Exception`
'CPY001', # Missing copyright notice at top of file
'D203', # "1 blank line required before class docstring" (Conflicts with D211)
'D213', # "Multi-line docstring summary should start at the second line" (Conflicts with D212)
'DOC201', # `return` is not documented in docstring
'DOC402', # `yield` is not documented in docstring
'EM101', # Exception must not use a string literal, assign to variable first
'FBT001', # Boolean-typed positional argument in function definition
'FIX001', # Line contains FIXME
'FIX002', # Line contains TODO
'FIX004', # Line contains HACK
'N803', # Argument name `startLine` should be lowercase
'N815', # Variable `lineMax` in class scope should not be mixedCase
'PLR0913', # Too many arguments in function definition (6 > 5)
'S101', # Use of `assert` detected
'TC002', # Move third-party import `mdformat.renderer.typing.Postprocess` into a type-checking block (for beartype)
'TC003', # Move standard library import `argparse` into a type-checking block (for beartype)
'TD001', # Invalid TODO tag: `FIXME`
'TD002', # Missing author in TODO; try: `# TODO(<author_name>): ...`
'TD003', # Missing issue link on the line following this TODO
'TRY003', # Avoid specifying long messages outside the exception class
]
preview = true
select = ['ALL']
unfixable = [
'ERA001', # Commented out code
]
[tool.ruff.lint.isort]
known-first-party = ['mdformat_admon', 'tests']
[tool.ruff.lint.per-file-ignores]
'__init__.py' = [
'D104', # Missing docstring in public package
]
'tests/*.py' = [
'ANN001', # Missing type annotation for function argument
'ANN201', # Missing return type annotation for public function
'ANN202', # Missing return type annotation for private function `test_make_diffable`
'ARG001', # Unused function argument: `line`
'D100', # Missing docstring in public module
'D103', # Missing docstring in public function
'PLC2701', # Private name import `_<>` from external module
'PT004', # flake8-pytest-style: fixture does not return
'S101', # Use of `assert` detected
]
[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 = ["python3.12", "python3.9"]
env_list = ["py312-pre-commit", "py312-ruff", "py312-test", "py312-type", "py39-hook", "py39-test"]
isolated_build = true
requires = ["tox>=4.20.0"]
skip_missing_interpreters = false
[tool.tox.env."py312-pre-commit"]
commands = [["pre-commit", "run", "--all-files", {default = [], extend = true, replace = "posargs"}]]
deps = "pre-commit>=4.0.1"
skip_install = true
[tool.tox.env."py312-ruff"]
commands = [
["ruff", "check", ".", "--fix", {default = [], extend = true, replace = "posargs"}],
["ruff", "format", "."],
]
deps = "ruff>=0.8.3"
description = "Optionally, specify: '-- --unsafe-fixes'"
skip_install = true
[tool.tox.env."py312-test"]
commands = [["pytest", "--cov=mdformat_admon", {default = [], extend = true, replace = "posargs"}]]
description = "Optionally, specify: '-- --exitfirst --failed-first --new-first -vv --beartype-packages=mdformat_admon'"
extras = ["test"]
[tool.tox.env."py312-type"]
commands = [["mypy", "./mdformat_admon", {default = [], extend = true, replace = "posargs"}]]
deps = ["mypy>=1.13.0"]
[tool.tox.env."py39-hook"]
commands = [["pre-commit", "run", "--config=.pre-commit-test.yaml", "--all-files", {default = ["--show-diff-on-failure", "--verbose"], extend = true, replace = "posargs"}]]
deps = "pre-commit>=4.0.1"
[tool.tox.env."py39-test"]
commands = [["pytest", "--cov=mdformat_admon"]]
extras = ["test"]
[tool.tox.env_run_base]
# Validates that commands are set
commands = [["error-commands-are-not-set"]]