forked from SupImDos/pydantic-argparse
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
98 lines (87 loc) · 2.6 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
[tool.poetry]
name = "pydantic-argparse"
version = "1.0.0"
description = "Typed Argument Parsing with Pydantic"
authors = ["Hayden Richards <[email protected]>"]
readme = "README.md"
license = "MIT"
homepage = "https://pydantic-argparse.supimdos.com"
repository = "https://github.com/SupImDos/pydantic-argparse"
keywords = ["python", "pydantic", "argparse", "typed", "validation"]
include = ["LICENSE.md"]
[tool.poetry.dependencies]
python = "^3.7"
pydantic = "^2"
boltons = "*"
importlib_metadata = { version = ">=4", python = "<3.8" }
typing_extensions = { version = ">=4", python = "<3.8" }
[tool.poetry.group.dev.dependencies]
poethepoet = "^0.18.1"
mypy = "^1.0.0"
ruff = "^0.0.247"
pytest = "^7.2.1"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
covdefaults = "^2.2.2"
mkdocs-material = "^9.0.13"
mkdocstrings = { extras = ["python-legacy"], version = "^0.20.0" }
mkdocs-gen-files = "^0.4.0"
mkdocs-literate-nav = "^0.6.0"
mkdocs-autorefs = "^0.4.1"
[tool.poe.tasks]
test = "pytest tests --cov=pydantic_argparse"
type = "mypy tests docs pydantic_argparse"
lint = "ruff tests docs pydantic_argparse"
clean = "rm -rf **/.coverage **/.mypy_cache **/.pytest_cache **/.ruff_cache **/__pycache__"
build = "poetry build"
publish = "poetry publish"
docs-serve = "mkdocs serve"
docs-publish = "mkdocs gh-deploy --force"
[tool.ruff]
line-length = 120
select = [
"F", # flake8
"E", # pycodestyle errors
"W", # pycodestyle warnings
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"D", # flake8-docstrings
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RUF", # ruff
]
ignore = [
"D401", # imperative mood - overly restrictive
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"] # allow unused imports in `__init__.py`
"tests/*.py" = ["S101"] # allow asserts in unit tests
[tool.ruff.pydocstyle]
convention = "google"
[tool.pytest.ini_options]
addopts = "--verbose"
log_cli_level = "DEBUG"
log_cli_format = "%(asctime)s.%(msecs)03d [%(levelname)-8s] (%(name)-11s): %(message)s"
log_cli_date_format = "%Y%m%dT%H%M%S"
[tool.coverage.run]
plugins = ["covdefaults"]
[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.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"