-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
210 lines (185 loc) · 5.55 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# vi: set ft=toml:
# Read `this <https://snarky.ca/what-the-heck-is-pyproject-toml/>`.
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
authors = [
"Adrian Cederberg <[email protected]>",
]
maintainers = [
"Adrian Cederberg <[email protected]>",
"Helio Chissini de Castro <[email protected]>"
]
name = "yaml-settings-pydantic"
version = "2.3.2"
description = "A tool to easily load (many) JSON/YAML files as pydantic settings."
readme = "README.rst"
keywords = [
"env",
"config",
"pydantic",
"settings",
"pydantic-settings",
"yaml",
"json",
"yaml-settings-pydantic"
]
license = "MIT"
packages = [{include = "yaml_settings_pydantic"}]
# The following were take directly from pyproject.toml in pydantic because I am lazy and the classifiers
# are applicable here.
classifiers = [
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: Unix',
'Operating System :: POSIX :: Linux',
'Environment :: Console',
'Environment :: MacOS X',
'Framework :: Hypothesis',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet',
'Typing :: Typed',
]
[tool.poetry.dependencies]
python = "^3.9"
pydantic = "^2.8.0"
pydantic-settings = "^2.3.4"
pyyaml = "^6.0.1"
jsonpath-ng = "^1.6.1"
[tool.poetry.group.dev.dependencies]
click = "^8.1.7"
pytest-cov = "^5.0.0"
pre-commit = "^3.7.1"
ruff = "^0.5.0"
types-pyyaml = "^6.0.12.20240311"
mypy = "^1.10.1"
pytest-mypy-plugins = "^3.1.2"
types-toml = "^0.10.8.20240310"
bumpver = "^2023.1129"
[tool.poetry.group.ci.dependencies]
twine = "^5.1.1"
build = "^1.2.1"
[tool.poetry.group.test.dependencies]
click = "^8.1.7"
pytest = "^8.2.2"
pytest-mypy = "^0.10.3"
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
log_cli = true
log_cli_level = "INFO"
pythonpath = "src"
[tool.pylint.messages_control]
disable = [
"abstract-method",
"arguments-differ",
"attribute-defined-outside-init",
"blacklisted-name",
"chained-comparison",
"duplicate-code",
"eval-used",
"exec-used",
"expression-not-assigned",
"fixme",
"global-statement",
"invalid-name",
"import-error",
"logging-fstring-interpolation",
"missing-docstring",
"no-member",
"no-name-in-module",
"protected-access",
"redefined-argument-from-local",
"redefined-outer-name",
"reimported",
"stop-iteration-return",
"too-few-public-methods",
"too-many-ancestors",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-return-statements",
"too-many-statements",
"unexpected-special-method-signature",
"unspecified-encoding",
]
[tool.mypy]
plugins = [
"pydantic.mypy",
]
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_defs = true
disallow_untyped_calls = false
follow_imports = "normal"
ignore_missing_imports = true
no_implicit_reexport = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff]
fix = true
line-length = 120
# Assume Python 3.9
target-version = "py39"
[tool.ruff.lint]
ignore = [
'S101', # assertions allowed
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ Required for tests.
'C408', # literals allowed
# ^^^^^^^^^^^^^^^^^^^^^^^^ Nothing wrong with using ``dict`` to construct dictionary.
'N803', # function name should be lowercase
'N806', # function should be lowercase
'SIM105', # Suggest contextlib instead of try/except with pass
]
extend-select = [
"E", # pycodestyle error
"W", # pycodestyle warning
"F", # pyflakes
"A", # flakes8-builtins
"C4", # flake8-comprehensions
"Q", # flake8-quotes
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"I", # isort
"N", # pep8 naming
"UP", # pyupgrade
"S", # bandit
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.pyright]
reportUnboundVariable = false
[tool.bumpver]
current_version = "2.3.2"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "chore(version): Bump version {old_version} -> {new_version}"
commit = true
tag = true
push = false
[tool.bumpver.file_patterns]
"pyproject.toml" = ['version = "{version}"']
"yaml_settings_pydantic/__init__.py" = ["{version}"]