[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "sphinx_external_toc"
dynamic = ["version"]
description = "A sphinx extension that allows the site-map to be defined in a single YAML file."
readme = "README.md"
authors = [{name = "Chris Sewell", email = "chrisj_sewell@hotmail.com"}]
license = {file = "LICENSE"}
classifiers = [
    "Development Status :: 3 - Alpha",
    "Framework :: Sphinx :: Extension",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Text Processing :: Markup",
]
keywords = ["sphinx","extension", "toc"]
requires-python = ">=3.9"
dependencies = [
    "click>=7.1",
    "pyyaml",
    "sphinx>=5",
]

[project.urls]
Homepage = "https://github.com/executablebooks/sphinx-external-toc"
Documentation = "https://sphinx-external-toc.readthedocs.io"

[project.entry-points]
"jb.cmdline" = {toc = "sphinx_external_toc.cli:main"}

[project.optional-dependencies]
code_style = ["pre-commit>=2.12"]
rtd = [
    "myst-parser>=1.0.0",
    "sphinx-book-theme>=1.0.0",
]
testing = [
    "coverage",
    "pytest>=7.1",
    "pytest-cov",
    "pytest-regressions",
]

[project.scripts]
sphinx-etoc = "sphinx_external_toc.cli:main"

[tool.flit.sdist]
exclude = [
    "docs/",
    "tests/",
]

[tool.mypy]
show_error_codes = true
warn_unused_ignores = true
warn_redundant_casts = true
no_implicit_optional = true
strict_equality = true

[[tool.mypy.overrides]]
module = ["docutils.*", "yaml.*"]
ignore_missing_imports = true


[tool.ruff.lint.isort]
force-sort-within-sections = true
