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
|
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "hatch-fancy-pypi-readme"
version = "25.1.0"
description = "Fancy PyPI READMEs with Hatch"
requires-python = ">=3.8"
keywords = ["hatch", "pypi", "readme", "documentation"]
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
license = "MIT"
license-files = ["LICENSE.txt"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Hatch",
"Operating System :: OS Independent",
"Topic :: Software Development :: Build Tools",
"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",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"hatchling",
"tomli; python_version<'3.11'",
]
[project.entry-points.hatch]
fancy-pypi-readme = "hatch_fancy_pypi_readme.hooks"
[project.scripts]
hatch-fancy-pypi-readme = "hatch_fancy_pypi_readme.__main__:main"
[project.optional-dependencies]
tests = ["pytest", "build", "wheel"]
dev = ["hatch-fancy-pypi-readme[tests]", "mypy"]
[project.urls]
Documentation = "https://github.com/hynek/hatch-fancy-pypi-readme#readme"
Changelog = "https://github.com/hynek/hatch-fancy-pypi-readme/blob/main/CHANGELOG.md"
"Source Code" = "https://github.com/hynek/hatch-fancy-pypi-readme"
Funding = "https://github.com/sponsors/hynek"
[project.readme]
content-type = "text/markdown"
text = """# Your ✨Fancy✨ Project Deserves a ✨Fancy✨ PyPI Readme!
*hatch-fancy-pypi-readme* is an MIT-licensed metadata plugin for [Hatch](https://hatch.pypa.io/) by [Hynek Schlawack](https://hynek.me/).
Its purpose is to help you to have fancy PyPI readmes – unlike *this* one you’re looking at right now.
Please check out the [documentation](https://github.com/hynek/hatch-fancy-pypi-readme#readme) to see what *hatch-fancy-pypi-readme* can do for you and your projects!
"""
[tool.pytest.ini_options]
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
testpaths = "tests"
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
filterwarnings = ["once::Warning"]
[tool.coverage.run]
parallel = true
branch = true
source = ["hatch_fancy_pypi_readme"]
[tool.coverage.paths]
source = ["src", ".tox/py*/**/site-packages"]
[tool.coverage.report]
show_missing = true
skip_covered = true
omit = ["src/hatch_fancy_pypi_readme/hooks.py"]
exclude_lines = [
# a more strict default pragma
"\\# pragma: no cover\\b",
# allow defensive code
"^\\s*raise AssertionError\\b",
"^\\s*raise NotImplementedError\\b",
"^\\s*return NotImplemented\\b",
"^\\s*raise$",
# typing-related code
"^if (False|TYPE_CHECKING):",
": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
]
partial_branches = [
"pragma: no branch",
# _cli._fail never returns, creating uncovered branches as far as coverage.py
# is concerned. See
# https://github.com/nedbat/coveragepy/issues/1433#issuecomment-1211465570
"^\\s*_fail\\(",
]
[tool.mypy]
strict = true
follow_imports = "normal"
enable_error_code = ["ignore-without-code"]
show_error_codes = true
warn_no_return = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[tool.ruff]
src = ["src", "tests"]
line-length = 79
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN", # Mypy is better at this.
"C901", # Leave complexity to me.
"COM", # Leave commas to formatter.
"D", # We have different ideas about docstrings.
"E501", # leave line-length enforcement to formatter.
"ISC001", # conflicts with formatter
"PLR0912", # Leave complexity to me.
"TRY301", # Raise in try blocks can totally make sense.
]
[tool.ruff.lint.per-file-ignores]
"src/hatch_fancy_pypi_readme/_cli.py" = ["T201"] # need print in CLI
"tests/*" = [
"PLC1901", # empty strings are falsey, but are less specific in tests
"S", # Security is not an issue in our tests.
"SIM300", # Yoda rocks in tests
]
[tool.ruff.lint.isort]
lines-between-types = 1
lines-after-imports = 2
|