-
Notifications
You must be signed in to change notification settings - Fork 18
/
pyproject.toml
120 lines (111 loc) · 3.29 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pydantic-argparse"
description = "Typed Argument Parsing with Pydantic"
authors = [{ name = "Hayden Richards", email = "supimdos@gmail.com" }]
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
dependencies = ["pydantic"]
classifiers = [
"Development Status :: 4 - Beta",
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Framework :: Pydantic',
'Topic :: Software Development :: Libraries :: Python Modules',
]
keywords = ["python", "pydantic", "argparse", "typed", "validation"]
dynamic = ["version"]
[project.urls]
Homepage = "https://pydantic-argparse.supimdos.com"
Documentation = "https://pydantic-argparse.supimdos.com"
Changelog = "https://github.com/SupImDos/pydantic-argparse/blob/master/CHANGELOG.md"
Repository = "https://github.com/SupImDos/pydantic-argparse"
Issues = "https://github.com/SupImDos/pydantic-argparse/issues"
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/pydantic_argparse/__metadata__.py"
build.targets.sdist.include = ["src/*", "LICENSE"]
[tool.hatch.envs.default]
installer = "uv"
path = ".venv"
dependencies = [
# Linting
"ruff",
# Typing
"mypy",
# Tests
"pytest",
"pytest-cov",
"pytest-mock",
"covdefaults",
# Docs
"mkdocs-material",
"mkdocstrings[python-legacy]",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-autorefs",
# Build
"build",
"hatch",
]
[tool.hatch.envs.default.scripts]
format = "ruff format src tests docs examples {args}"
lint = "ruff check src tests docs examples {args}"
test = "pytest tests --cov=src {args}"
type = "mypy src tests docs examples {args}"
build = "hatch build {args}"
publish = "hatch publish {args}"
docs-serve = "mkdocs serve {args}"
docs-publish = "mkdocs gh-deploy --force {args}"
[tool.ruff]
line-length = 120
lint.select = [
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"I", # isort
"N", # pep8-naming
"E", # pycodestyle errors
"W", # pycodestyle warnings
"D", # pydocstyle
"F", # pyflakes
"UP", # pyupgrade
"RUF", # ruff
]
lint.ignore = [
"D401", # imperative mood - overly restrictive
"S101", # allow assertions
]
lint.isort.known-first-party = ["pydantic_argparse", "tests"]
lint.isort.forced-separate = ["typing"]
lint.pydocstyle.convention = "google"
[tool.mypy]
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = true
warn_return_any = true
warn_unused_ignores = true
no_implicit_optional = true
show_error_codes = true
plugins = ["pydantic.v1.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.coverage.run]
plugins = ["covdefaults"]