-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
93 lines (85 loc) · 3.83 KB
/
Copy pathpyproject.toml
File metadata and controls
93 lines (85 loc) · 3.83 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
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[project]
name = 'markdown-prose-hooks'
version = '0.4.0'
description = 'Pre-commit hooks that reflow Markdown prose to one line per paragraph.'
readme = 'README.md'
# PEP 639: an SPDX expression plus the file, rather than the whole license
# text inlined into a `License:` field. Metadata is immutable per release, so
# the modern spelling is worth having from the first one rather than after.
license = 'MIT'
license-files = ['LICENSE']
authors = [{ name = 'Michael I Chen' }]
keywords = ['pre-commit', 'markdown', 'formatter', 'prose', 'linter']
# 3.10 is the real floor: `dataclass(slots=True)`. Nothing here reaches past
# it — the one 3.13-only call, `Path.read_text(newline=...)`, is deliberately
# spelled `Path.open(...)` instead, because a hook cannot impose an interpreter
# on the repositories that install it.
requires-python = '>=3.10'
dependencies = []
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Text Processing :: Markup :: Markdown',
]
[project.urls]
Homepage = 'https://github.com/michen00/markdown-prose-hooks'
Issues = 'https://github.com/michen00/markdown-prose-hooks/issues'
[project.scripts]
unwrap-markdown-prose-py = 'markdown_prose_hooks.unwrap:main'
[dependency-groups]
# `jupyter` and `matplotlib` serve docs/benchmarks.ipynb and nothing else. The
# shipped package's `dependencies` above stays empty -- that promise is about
# what a consumer installs. A benchmark that pip-installs its own tooling at
# run time is not a reproducible record, which is why these are pinned here
# rather than left to a `%pip install` cell.
dev = [
'jupyter>=1.1',
# matplotlib rather than plotly: GitHub's notebook renderer does not run
# JavaScript, so an interactive chart is invisible in the one place this
# document is read. A static PNG renders inline there.
'matplotlib>=3.9',
# `make tidy` and `make develop` both run it, and an undeclared `uv run
# pre-commit` falls through the project environment to whatever sits on PATH,
# which on a development machine is as likely to be another project's
# virtualenv as anything. `make check` should not resolve its own tooling by
# luck. Not a second pin of anything: the CI jobs install their own copy, and a
# newer runner finds the same things, because every tool it runs is pinned by
# its own `rev:`.
'pre-commit>=4',
'pytest>=8',
'pytest-cov>=5',
]
[tool.hatch.build.targets.wheel]
packages = ['src/markdown_prose_hooks']
[tool.pytest.ini_options]
testpaths = ['tests']
addopts = '--strict-markers'
[tool.coverage.run]
source = ['src/markdown_prose_hooks']
[tool.mypy]
# The floor rather than the development interpreter, matching `target-version`
# in .ruff.toml: this package is imported by whatever Python a consumer
# installed it under, and the oldest one it promises is where a
# version-dependent type error would surface first.
python_version = '3.10'
strict = true
# The src layout means the package is not importable from the repository root,
# and the pre-commit hook installs the test dependencies rather than this
# package. Pointing mypy at the source tree is what lets `tests/` resolve the
# import without a build step standing between an edit and the check.
mypy_path = 'src'
# mypy reads Python, and a notebook is JSON carrying Python. Nothing here can
# type-check it, so saying so beats a confusing parse error. ruff covers that
# file instead -- it reads the notebook format natively.
exclude = '\.ipynb$'