HexCasting/doc/{{cookiecutter.output_directory}}/pyproject.toml
2023-09-17 18:05:11 -04:00

116 lines
3.2 KiB
TOML

[build-system]
requires = ["hatchling", "hatch-gradle-version>=0.7.0"]
build-backend = "hatchling.build"
# project metadata
[project]
name = "{{ cookiecutter.__project_name }}"
description = "Python web book docgen and hexdoc plugin for {{ cookiecutter.mod_display_name }}."
readme = "doc/README.md"
authors = [
{ name="{{ cookiecutter.author }}" },
]
keywords = ["hexdoc"]
requires-python = ">=3.11"
dynamic = ["version", "dependencies", "optional-dependencies"]
[project.urls]
Homepage = "{{ cookiecutter.fallback_book_url }}"
Source = "https://github.com/{{ cookiecutter.author }}/{{ cookiecutter.github_repo }}/tree/{{ cookiecutter.main_branch }}/doc"
# Gradle version/deps
[tool.hatch.version]
scheme = "gradle"
source = "gradle-properties"
py-path = "doc/{{ cookiecutter.__src }}/__version__.py"
[tool.hatch.metadata.hooks.gradle-properties]
dependencies = [ # this can include normal dependency strings too
{ package="hexdoc", op="~=", py-version="{{ cookiecutter._hexdoc_version }}", key="hexcastingVersion" },
]
[tool.hatch.metadata.hooks.gradle-properties.optional-dependencies]
dev = [
"black==23.7.0",
"isort==5.12.0",
]
# directory inclusion
[tool.hatch.build]
only-include = [
"doc/{{ cookiecutter.__src }}",
"gradle.properties",
]
artifacts = [
"/doc/{{ cookiecutter.__export_root }}/generated",
"/doc/{{ cookiecutter.__src }}/__gradle_version__.py",
]
[tool.hatch.build.targets.wheel]
sources = ["doc/src"]
# hexdoc entry points
[project.entry-points.hexdoc]
{{ cookiecutter.modid }} = "{{ cookiecutter.__project_slug }}._hooks:{{ cookiecutter.plugin_classname }}"
# linting
[tool.pyright]
pythonVersion = "3.11"
pythonPlatform = "All"
include = ["doc/src"]
extraPaths = ["doc/src"]
typeCheckingMode = "basic"
strictDictionaryInference = true
strictListInference = true
strictSetInference = true
reportAssertAlwaysTrue = "error"
reportConstantRedefinition = "error"
reportDeprecated = "error"
reportDuplicateImport = "error"
reportFunctionMemberAccess = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportIncompleteStub = "error"
reportInconsistentConstructor = "error"
reportInvalidStringEscapeSequence = "error"
reportInvalidStubStatement = "error"
reportInvalidTypeVarUse = "error"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeStubs = "error"
reportOverlappingOverload = "error"
reportSelfClsParameterName = "error"
reportTypeCommentUsage = "error"
reportUnknownParameterType = "error"
reportUnnecessaryCast = "error"
reportUnnecessaryContains = "error"
reportUnsupportedDunderAll = "error"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
reportWildcardImportFromLibrary = "error"
reportMissingTypeArgument = "warning"
reportPrivateUsage = "warning"
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "warning"
reportUnknownMemberType = "warning"
reportUnnecessaryComparison = "warning"
reportUnnecessaryIsInstance = "warning"
reportUnusedClass = "warning"
reportUnusedExpression = "warning"
reportUnusedFunction = "warning"
reportUnusedImport = "warning"
reportUnusedVariable = "warning"
reportUnknownVariableType = "none"