forked from koxudaxi/datamodel-code-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
150 lines (126 loc) · 3.85 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[tool.poetry]
name = "datamodel-code-generator"
version = "0.0.0"
description = "Datamodel Code Generator"
authors = ["Koudai Aono <[email protected]>"]
readme = "README.md"
license = "MIT"
homepage = "https://github.com/koxudaxi/datamodel-code-generator"
repository = "https://github.com/koxudaxi/datamodel-code-generator"
classifiers = [
"Development Status :: 4 - Beta",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython"]
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
# language=RegExp
pattern = '^(?P<base>\d+\.\d+\.\d+)(-?((?P<stage>[a-zA-Z]+)\.?(?P<revision>\d+)?))?$'
[tool.poetry-dynamic-versioning.substitution]
files = ["*/version.py"]
patterns = ["(^version: str = ')[^']*(')"]
[tool.poetry.scripts]
datamodel-codegen = "datamodel_code_generator.__main__:main"
[tool.poetry.dependencies]
python = "^3.7"
pydantic = [
{extras = ["email"], version = ">=1.5.1,<3.0", python = "<3.10"},
{extras = ["email"], version = ">=1.9.0,<3.0", python = "~3.10"},
{extras = ["email"], version = ">=1.10.0,<3.0", python = "^3.11"}
]
argcomplete = ">=1.10,<4.0"
prance = ">=0.18.2"
openapi-spec-validator = ">=0.2.8,<=0.5.2"
jinja2 = ">=2.10.1,<4.0"
inflect = ">=4.1.0,<6.0"
black = ">=19.10b0"
isort = ">=4.3.21,<6.0"
PySnooper = ">=0.4.1,<2.0.0"
toml = ">=0.10.0,<1.0.0"
genson = ">=1.2.1,<2.0"
httpx = { version = "*", optional = true }
packaging = "*"
[tool.poetry.group.dev.dependencies]
pytest = ">6.0"
pytest-benchmark = "*"
pytest-cov = ">=2.12.1"
pytest-mock = "*"
mypy = ">=1.4.1,<1.5.0"
black = "^23.3.0"
freezegun = "*"
types-Jinja2 = "*"
types-PyYAML = "*"
types-toml = "*"
types-setuptools = ">=67.6.0.5,<69.0.0.0"
pydantic= "^2.0b3"
httpx = "*"
ruff = "*"
[tool.poetry.extras]
http = ["httpx"]
[tool.ruff]
line-length = 88
extend-select = ['Q', 'RUF100', 'C4', 'UP', 'I']
flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'}
target-version = 'py37'
ignore = ['E501', 'UP006', 'UP007']
extend-exclude = ['tests/data']
[tool.black]
line-length = 88
skip-string-normalization = true
# language=RegExp
exclude = '(tests/data|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist|.*\/models\.py.*|.*\/models\/.*)'
target-version = ['py37']
[tool.ruff.isort]
#multi-line-output = 3
#include-trailing-comma = true
#force-grid-wrap = 0
#use-parentheses = true
#line-length = 88
#skip = "tests/data"
[tool.mypy]
plugins = "pydantic.mypy"
ignore_missing_imports = true
follow_imports = "silent"
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = false
warn_untyped_fields = true
[tool.pytest.ini_options]
filterwarnings = "ignore::DeprecationWarning:distutils"
norecursedirs = "tests/data/*"
[tool.coverage.run]
source = ["datamodel_code_generator"]
branch = true
[tool.coverage.report]
ignore_errors = true
exclude_lines = [
"if self.debug:",
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if not TYPE_CHECKING:"]
omit = ["tests/*"]
[tool.pydantic-pycharm-plugin]
ignore-init-method-arguments = true
[tool.pydantic-pycharm-plugin.parsable-types]
# str field may parse int and float
str = ["int", "float"]