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

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

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

<% } -%>
[tool.poetry]
name = "<%= packageName %>"
version = "1.0.0"
description = "<%= description %>"
authors = [ ]
license = 'Proprietary'
readme = 'README.md'

  [[tool.poetry.packages]]
  include = "<%= moduleName %>"

  [tool.poetry.dependencies]
  python = "<%- pyprojectPythonDependency %>"

<%if (((individualPackage && !devDependenciesProject) && linter === 'flake8') || ((individualPackage && !devDependenciesProject) && unitTestRunner === 'pytest')) { -%>
  [tool.poetry.group.dev.dependencies]
  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.poetry.group.dev.dependencies.<%- devDependenciesProjectPkgName %>]
  path = "<%- devDependenciesProjectPath %>"
  develop = true

<% } -%>
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
<%if (individualPackage && !devDependenciesProject && 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 = []
<% } -%>
