[build-system]
build-backend = "build_backend"
requires = [
  "maturin>=1.14.1",
]
backend-path = [ "." ]

[project]
name = "tox-toml-fmt"
description = "Format your pyproject.toml file"
readme = { file = "README.rst", content-type = "text/x-rst" }
keywords = [
  "format",
  "pyproject",
]
license.file = "LICENSE.txt"
authors = [
  { name = "Bernat Gabor", email = "gaborjbernat@gmail.com" },
]
requires-python = ">=3.10"
classifiers = [
  "License :: OSI Approved :: MIT License",
  "Operating System :: OS Independent",
  "Programming Language :: Python",
  "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",
  "Programming Language :: Python :: 3.15",
  "Programming Language :: Python :: Free Threading :: 1 - Unstable",
]
dynamic = [
  "version",
]
dependencies = [
  "toml-fmt-common",
]
urls."Bug Tracker" = "https://github.com/tox-dev/toml-fmt/issues"
urls."Source Code" = "https://github.com/tox-dev/toml-fmt/tree/main/tox-toml-fmt"
urls.Changelog = "https://github.com/tox-dev/toml-fmt/blob/main/tox-toml-fmt/CHANGELOG.md"
urls.Documentation = "https://tox-toml-fmt.readthedocs.io/en/latest/"
scripts.tox-toml-fmt = "tox_toml_fmt.__main__:runner"

[dependency-groups]
dev = [
  { include-group = "fix" },
  { include-group = "test" },
  { include-group = "type" },
]
test = [
  "covdefaults>=2.3",
  "pytest>=9.1.1",
  "pytest-cov>=7.1",
  "pytest-mock>=3.15.1",
]
type = [
  "mypy==2.3.1",
  "types-cachetools>=7.0.0.20260713",
  "types-chardet>=5.0.4.6",
  { include-group = "test" },
]
docs = [
  "furo>=2025.12.19; python_version>='3.14'",
  "sphinx>=9.1; python_version>='3.14'",
  "sphinx-argparse-cli>=1.22.1; python_version>='3.14'",
  "sphinx-autodoc-typehints>=3.13.2; python_version>='3.14'",
  "sphinx-copybutton>=0.5.2; python_version>='3.14'",
  "sphinx-inline-tabs>=2025.12.21.14; python_version>='3.14'",
  "sphinx-llm>=1",
]
fix = [
  "pre-commit-uv>=4.3",
]
pkg-meta = [
  "check-wheel-contents>=0.6.3",
  "twine>=7",
  "uv>=0.12.5",
]

[tool.maturin]
module-name = "tox_toml_fmt._lib"
bindings = "pyo3"
python-source = "src"
manifest-path = "Cargo.toml"
include = [
  # ship the in-tree PEP 517 backend in the sdist so wheels can be built from the sdist
  { path = "build_backend.py", format = "sdist" },
  { path = "rust-toolchain.toml", format = "sdist" },
  { path = "docs/", format = "sdist" },
  { path = "CHANGELOG.md", format = "sdist" },
  { path = "README.rst", format = "sdist" },
]
exclude = [
  "**/*.pyc",
  "**/*.pyo",
  "**/__pycache__/**",
]
strip = true

[tool.pyproject-fmt]
max_supported_python = "3.15"

[tool.mypy]
strict = true
show_error_codes = true

[tool.coverage]
run.omit = [
  "*/_vendor/*", # vendored toml_fmt_common is covered by its own test suite
]
run.parallel = true
run.plugins = [
  "covdefaults",
]
paths.source = [
  "src",
  ".tox/*/.venv/lib/*/site-packages",
  ".tox\\*\\.venv\\Lib\\site-packages",
  ".tox/*/lib/*/site-packages",
  ".tox\\*\\Lib\\site-packages",
  "**/src",
  "**\\src",
]
report.fail_under = 100
html.show_contexts = true
html.skip_covered = false
