<%if (codeCoverage) { -%>
[tool.coverage.run]
branch = true
<%if (srcDir) { -%>
source = [ "src" ]
<% } else { -%>
source = [ "<%= moduleName %>" ]
<% } -%>

[tool.coverage.report]
exclude_lines = ['if TYPE_CHECKING:']
show_missing = true

<% } -%>
<%if (unitTestRunner === 'pytest' && pythonAddopts) { -%>
[tool.pytest.ini_options]
addopts = """<%- pythonAddopts %>"""

<% } -%>
[project]
name = "<%= packageName %>"
version = "1.0.0"
description = "<%= description %>"
requires-python = "<%- pyprojectPythonDependency %>"
readme = 'README.md'
dependencies = []

<%if (!srcDir) { -%>
[tool.hatch.build.targets.wheel]
packages = ["<%= moduleName %>"]

[tool.hatch.metadata]
allow-direct-references = true
<% } -%>
<%if (devDependenciesProject !== '' || individualPackage) { -%>

[dependency-groups]
dev = [
<%if (devDependenciesProject !== '') { -%>
  "<%- devDependenciesProjectPkgName %>",
<% } -%>
<%if ((individualPackage && !devDependenciesProject) || (individualPackage && !devDependenciesProject)) { -%>
  "autopep8>=<%- versionMap['autopep8'] %>",
<%if (individualPackage && !devDependenciesProject && linter === 'flake8') { -%>
  "flake8>=<%- versionMap['flake8'] %>",
<% } -%>
<%if (individualPackage && !devDependenciesProject && linter === 'ruff') { -%>
  "ruff>=<%- versionMap['ruff'] %>",
<% } -%>
<%if (individualPackage && !devDependenciesProject && unitTestRunner === 'pytest') { -%>
  "pytest>=<%- versionMap['pytest'] %>",
  "pytest-sugar>=<%- versionMap['pytest-sugar'] %>",
<% } -%>
<%if (individualPackage && !devDependenciesProject && unitTestRunner === 'pytest' && codeCoverage) { -%>
  "pytest-cov>=<%- versionMap['pytest-cov'] %>",
<% } -%>
<%if (individualPackage && !devDependenciesProject && unitTestRunner === 'pytest' && codeCoverage && codeCoverageHtmlReport) { -%>
  "pytest-html>=<%- versionMap['pytest-html'] %>",
<% } -%>
<% } -%>
]
<% } -%>
<%if (devDependenciesProject !== '') { -%>

[tool.uv.sources]
<%if (individualPackage) { -%>
<%- devDependenciesProjectPkgName %> = { path = "<%- devDependenciesProjectPath %>" }
<% } -%>
<%if (!individualPackage) { -%>
<%- devDependenciesProjectPkgName %> = { workspace = true }
<% } -%>
<% } -%>

<%if (buildSystem === 'hatch') { -%>
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
<% } else if (buildSystem === 'uv') { -%>
[build-system]
requires = ["uv_build>=0.8.9,<0.9.0"]
build-backend = "uv_build"
<% } -%>
<%if (linter === 'ruff') { -%>

[tool.ruff]
exclude = [
  ".ruff_cache",
  ".svn",
  ".tox",
  ".venv",
  "dist",
]

line-length = 88
indent-width = 4

[tool.ruff.lint]
select = [
  # pycodestyle
  "E",
  # Pyflakes
  "F",
  # pyupgrade
  "UP",
  # flake8-bugbear
  "B",
  # flake8-simplify
  "SIM",
  # isort
  "I",
]
ignore = []

fixable = ["ALL"]
unfixable = []
<% } -%>
