-
-
Notifications
You must be signed in to change notification settings - Fork 319
/
Copy pathpyproject.toml
165 lines (153 loc) · 4.4 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.25",
]
[project]
name = "datamodel-code-generator"
description = "Datamodel Code Generator"
readme.content-type = "text/markdown"
readme.file = "README.md"
license = "MIT"
authors = [ { name = "Koudai Aono", email = "[email protected]" } ]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: Implementation :: CPython",
]
dynamic = [
"version",
]
dependencies = [
"argcomplete>=2.10.1,<4",
"black>=19.10b0",
"genson>=1.2.1,<2",
"graphql-core>=3.2.3",
"httpx>=0.24.1",
"inflect>=4.1,<6",
"isort>=4.3.21,<6",
"jinja2>=2.10.1,<4",
"openapi-spec-validator>=0.2.8,<0.7",
"packaging",
"prance>=0.18.2",
"pydantic>=1.10",
"pysnooper>=0.4.1,<2",
"pyyaml>=6.0.1",
"tomli>=2.2.1,<3; python_version<='3.11'",
]
optional-dependencies.debug = [ "pysnooper" ]
optional-dependencies.graphql = [ "graphql-core" ]
optional-dependencies.http = [ "httpx" ]
optional-dependencies.validation = [ "openapi-spec-validator", "prance" ]
urls.Homepage = "https://github.com/koxudaxi/datamodel-code-generator"
urls.Source = "https://github.com/koxudaxi/datamodel-code-generator"
scripts.datamodel-codegen = "datamodel_code_generator.__main__:main"
[dependency-groups]
dev = [
{ include-group = "docs" },
{ include-group = "fix" },
{ include-group = "pkg-meta" },
{ include-group = "test" },
{ include-group = "type" },
]
test = [
"diff-cover>=7.7",
"freezegun",
"pytest>=6.1",
"pytest>=8.3.4",
"pytest-benchmark",
"pytest-codspeed>=2.2",
"pytest-cov>=2.12.1",
"pytest-cov>=5",
"pytest-mock>=3.14",
"pytest-xdist>=3.3.1",
]
type = [
"mypy>=1.4.1,<1.5",
"types-jinja2",
"types-pyyaml",
"types-setuptools>=67.6.0.5,<70",
"types-toml",
{ include-group = "test" },
]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5.31",
]
fix = [ "pre-commit>=3.5" ]
pkg-meta = [ "check-wheel-contents>=0.6.1", "twine>=6.1", "uv>=0.5.22" ]
[tool.hatch]
build.dev-mode-dirs = [ "." ]
build.targets.sdist.include = [
"/datamodel_code_generator",
"/tests",
]
version.source = "vcs"
[tool.ruff]
line-length = 88
extend-exclude = [ "tests/data" ]
format.indent-style = "space"
format.quote-style = "single"
format.line-ending = "auto"
format.skip-magic-trailing-comma = false
lint.extend-select = [ "C4", "I", "Q", "RUF100", "UP" ]
lint.ignore = [ "E501", "Q000", "Q003", "UP006", "UP007" ]
lint.flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
[tool.codespell]
skip = '.git,*.lock,tests'
[tool.pytest.ini_options]
filterwarnings = [
"error",
"ignore:^.*The `parse_obj` method is deprecated; use `model_validate` instead.*",
"ignore:^.*The `__fields_set__` attribute is deprecated, use `model_fields_set` instead.*",
"ignore:^.*The `dict` method is deprecated; use `model_dump` instead.*",
"ignore:^.*The `copy` method is deprecated; use `model_copy` instead.*",
"ignore:^.*`--validation` option is deprecated.*",
"ignore:^.*Field name `name` is duplicated on Pet.*",
"ignore:^.*format of 'unknown-type' not understood for 'string' - using default.*",
"ignore:^.*unclosed file.*",
]
norecursedirs = "tests/data/*"
[tool.coverage]
run.source = [ "datamodel_code_generator" ]
run.branch = true
run.omit = [ "scripts/*" ]
report.ignore_errors = true
report.exclude_lines = [
"if self.debug:",
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if not TYPE_CHECKING:",
]
report.omit = [ "tests/*" ]
[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.pydantic-pycharm-plugin]
ignore-init-method-arguments = true
parsable-types.str = [ "int", "float" ]