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
|
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mkdocs-section-index"
description = "MkDocs plugin to allow clickable sections that lead to an index page"
readme = "README.md"
license = "MIT"
keywords = ["mkdocs", "mkdocs-plugin"]
authors = [
{name = "Oleh Prypin", email = "oleh@pryp.in"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
# Begin Python versions
"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",
# End Python versions
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
"Topic :: Text Processing :: Markup :: Markdown",
"Typing :: Typed",
]
dynamic = ["version"]
requires-python = ">=3.9"
dependencies = [
"mkdocs >=1.2, <=1.6.1",
"properdocs >=1.6.5",
]
[project.urls]
Documentation = "https://oprypin.github.io/mkdocs-section-index/"
Source = "https://github.com/oprypin/mkdocs-section-index"
Issues = "https://github.com/oprypin/mkdocs-section-index/issues"
History = "https://github.com/oprypin/mkdocs-section-index/releases"
[project.entry-points."mkdocs.plugins"]
section-index = "mkdocs_section_index.plugin:SectionIndexPlugin"
[tool.hatch.version]
path = "mkdocs_section_index/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/mkdocs_section_index", "/tests"]
[tool.hatch.env]
requires = [
"hatch-mkdocs",
"hatch-pip-compile >=1.7.0",
]
[tool.hatch.envs.default.scripts]
all = [
"hatch run style:fix",
"hatch run types:check",
"hatch run test:test",
]
[tool.hatch.envs.test]
dependencies = [
"pytest",
"pytest-golden",
"testfixtures >=6.15.0",
"MechanicalSoup >=0.12.0",
"mkdocs-material >=6.1.5",
"mkdocs-nature >=0.5",
#min "jinja2 >=2.11.0",
#min "markupsafe >=2.0.1",
]
[tool.hatch.envs.test.scripts]
test = [
"pytest -q {args}",
"bash .tools/test.sh {args}",
]
[tool.hatch.envs.types]
dependencies = [
"mypy",
]
[tool.hatch.envs.types.scripts]
check = "mypy {args} mkdocs_section_index"
[tool.hatch.envs.style]
type = "pip-compile"
detached = true
dependencies = [
"ruff",
]
[tool.hatch.envs.style.scripts]
check = "ruff check mkdocs_section_index tests {args}"
format = "ruff format -q mkdocs_section_index tests"
fix = [
"check --fix --unsafe-fixes",
"format",
]
[tool.hatch.env.collectors.mkdocs.docs]
[tool.hatch.envs.docs]
type = "pip-compile"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
preview = true
select = [
"F", "E", "W", "I", "UP", "YTT", "ASYNC", "FBT", "C4", "DTZ", "T10", "FA", "ISC", "PIE", "T20", "RSE",
"N803", "N804", "N805", "N806", "N807", "N815", "N816", "N999",
"S201", "S202", "S303", "S304", "S305", "S306", "S506", "S602", "S604", "S605", "S612",
"B002", "B003", "B004", "B005", "B007", "B008", "B009", "B010", "B011", "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B019", "B020", "B021", "B022", "B023", "B025", "B026", "B029", "B030", "B031", "B032", "B033", "B034", "B035", "B039", "B905", "B909", "B911",
"COM818",
"LOG001", "LOG007", "LOG009", "LOG015",
"G001", "G002", "G003", "G010", "G101", "G201", "G202",
"PYI001", "PYI002", "PYI003", "PYI004", "PYI005", "PYI006", "PYI007", "PYI008", "PYI009", "PYI010", "PYI011", "PYI012", "PYI013", "PYI014", "PYI015", "PYI016", "PYI017", "PYI018", "PYI019", "PYI020", "PYI021", "PYI024", "PYI025", "PYI026", "PYI029", "PYI030", "PYI032", "PYI033", "PYI034", "PYI035", "PYI036", "PYI041", "PYI042", "PYI043", "PYI044", "PYI045", "PYI046", "PYI047", "PYI048", "PYI049", "PYI050", "PYI051", "PYI052", "PYI053", "PYI054", "PYI055", "PYI056", "PYI057", "PYI058", "PYI059", "PYI061", "PYI062", "PYI063", "PYI064", "PYI066",
"PT001", "PT002", "PT003", "PT006", "PT007", "PT008", "PT009", "PT010", "PT013", "PT014", "PT015", "PT016", "PT018", "PT019", "PT020", "PT021", "PT022", "PT023", "PT024", "PT025", "PT026", "PT027",
"Q004",
"RET502", "RET503", "RET504",
"SIM101", "SIM103", "SIM105", "SIM107", "SIM109", "SIM110", "SIM113", "SIM114", "SIM118", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM212", "SIM220", "SIM221", "SIM222", "SIM223", "SIM300", "SIM401", "SIM905", "SIM910", "SIM911",
"TC001", "TC002", "TC003", "TC004", "TC005", "TC006", "TC007", "TC008", "TC010",
"PTH201",
"TD004", "TD005", "TD006", "TD007",
"PGH003", "PGH004", "PGH005",
"PLC0105", "PLC0131", "PLC0132", "PLC0205", "PLC0206", "PLC0208", "PLC0414", "PLC2401", "PLC2403", "PLC2701", "PLC2801", "PLC3002",
"PLR0124", "PLR0133", "PLR0202", "PLR0203", "PLR0206", "PLR0402", "PLR1716", "PLR1722", "PLR1733", "PLR1736", "PLR2044", "PLR6301",
"TRY201", "TRY203", "TRY401",
"FLY002",
"PERF101", "PERF102", "PERF402", "PERF403",
"FURB105", "FURB110", "FURB116", "FURB118", "FURB129", "FURB131", "FURB132", "FURB136", "FURB142", "FURB145", "FURB148", "FURB154", "FURB156", "FURB157", "FURB161", "FURB163", "FURB164", "FURB166", "FURB167", "FURB168", "FURB169", "FURB171", "FURB177", "FURB180", "FURB181", "FURB188", "FURB192",
"RUF001", "RUF002", "RUF003", "RUF005", "RUF006", "RUF007", "RUF008", "RUF009", "RUF010", "RUF012", "RUF013", "RUF015", "RUF016", "RUF017", "RUF018", "RUF019", "RUF020", "RUF021", "RUF022", "RUF023", "RUF024", "RUF026", "RUF028", "RUF029", "RUF030", "RUF031", "RUF032", "RUF033", "RUF034", "RUF035", "RUF036", "RUF037", "RUF038", "RUF039", "RUF040", "RUF041", "RUF043", "RUF046", "RUF047", "RUF048", "RUF049", "RUF051", "RUF052", "RUF055", "RUF056", "RUF057", "RUF058", "RUF100", "RUF101", "RUF200",
]
ignore = ["E501", "E731", "UP038"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["PLC2701", "PLR6301"]
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.flake8-type-checking]
exempt-modules = ["typing", "collections.abc"]
[tool.mypy]
warn_unreachable = true
allow_redefinition = true
[tool.pytest.ini_options]
addopts = "--tb=native"
enable_assertion_pass_hook = true
filterwarnings = ["ignore::DeprecationWarning:.*:",
"default::DeprecationWarning:mkdocs_section_index.*:"]
testpaths = ["tests"]
|