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
|
[tool.poetry]
name = "datamodel-code-generator"
version = "0.26.4"
description = "Datamodel Code Generator"
authors = ["Koudai Aono <koxudaxi@gmail.com>"]
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.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"]
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"
[tool.poetry-dynamic-versioning]
enable = false
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.8"
pydantic = [
{extras = ["email"], version = ">=1.5.1,<3.0,!=2.4.0", python = "<3.10"},
{extras = ["email"], version = ">=1.9.0,<3.0,!=2.4.0", python = "~3.10"},
{extras = ["email"], version = ">=1.10.0,<3.0,!=2.4.0", python = "^3.11"},
{extras = ["email"], version = ">=1.10.0,!=2.0.0,!=2.0.1,<3.0,!=2.4.0", python = "^3.12"}
]
argcomplete = ">=1.10,<4.0"
jinja2 = ">=2.10.1,<4.0"
inflect = ">=4.1.0,<6.0"
black = ">=19.10b0"
isort = ">=4.3.21,<6.0"
genson = ">=1.2.1,<2.0"
packaging = "*"
prance = { version = ">=0.18.2", optional = true }
openapi-spec-validator = { version = ">=0.2.8,<0.7.0", optional = true }
toml = { version = ">=0.10.0,<1.0.0", python = "<3.11" }
PySnooper = { version = ">=0.4.1,<2.0.0", optional = true }
httpx = { version = "*", optional = true }
pyyaml = ">=6.0.1"
graphql-core = {version = "^3.2.3", optional = true}
[tool.poetry.group.dev.dependencies]
pytest = ">6.1"
pytest-benchmark = "*"
pytest-cov = ">=2.12.1"
pytest-mock = "*"
mypy = ">=1.4.1,<1.5.0"
black = ">=23.3,<25.0"
freezegun = "*"
types-Jinja2 = "*"
types-PyYAML = "*"
types-toml = "*"
types-setuptools = ">=67.6.0.5,<70.0.0.0"
pydantic = "*"
httpx = ">=0.24.1"
PySnooper = "*"
ruff = ">=0.0.290,<0.7.5"
ruff-lsp = ">=0.0.39,<0.0.60"
pre-commit = "*"
pytest-xdist = "^3.3.1"
prance = "*"
openapi-spec-validator = "*"
pytest-codspeed = "^2.2.0"
[tool.poetry.extras]
http = ["httpx"]
graphql = ["graphql-core"]
debug = ["PySnooper"]
validation = ["prance", "openapi-spec-validator"]
[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', 'Q000', 'Q003' ]
extend-exclude = ['tests/data']
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[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
omit = ["scripts/*"]
[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"]
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git,*.lock,tests'
# check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''
|