-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
222 lines (204 loc) · 5.32 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
211
212
213
214
215
216
217
218
219
220
221
222
[build-system]
requires = ["setuptools>=64", "build==0.*", "wheel==0.*", "twine==4.*"]
build-backend = "setuptools.build_meta"
[project]
name = "yapx"
authors = [
{name = "Donald Mellenbruch", email = "[email protected]"},
]
description = "The next generation of Python's Argparse."
readme = "README.pypi.md"
license = {file = "LICENSE"}
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
]
dynamic = ["version"]
dependencies = [
"typing-extensions; python_version<'3.10'",
"importlib-metadata; python_version<'3.8'",
]
[project.optional-dependencies]
dev = [
"pdbpp",
# python -m ipykernel install --user --name yapx
"ipykernel",
"ipywidgets",
"ipython",
]
tests = [
"pytest==7.*",
"pytest-cov==4.*",
"pytest-html==3.*",
"pytest-sugar==0.*",
"pytest-custom-exit-code==0.3.*",
"packaging==23.*",
"pydantic>=1.10.3,<3",
"shtab==1.6.*",
"rich-argparse==1.*",
"pyyaml>=5,<7",
]
pydantic = [
"pydantic>=1.10.3,<3",
]
shtab = [
"shtab==1.6.*",
]
rich = [
"rich-argparse==1.*",
]
yaml = [
"pyyaml>=5,<7",
]
tui = [
"argparse-tui>=0.2.1,<1",
]
extras = [
"pydantic>=1.10.3,<3",
"shtab==1.6.2",
"rich-argparse==1.*",
"pyyaml>=5,<7",
"argparse-tui>=0.2.2,<1",
]
[project.urls]
Homepage = "https://www.f2dv.com/r/yapx"
Repository = "https://www.github.com/fresh2dev/yapx"
# Funding = "https://www.f2dv.com/fund"
[tool.setuptools.package-data]
"*" = ["**"]
[tool.setuptools.packages.find]
where = ["src"]
include = ["*"]
exclude = []
namespaces = false
[tool.setuptools.dynamic]
version = {attr = "yapx.__version__.__version__"}
[tool.pytest.ini_options]
minversion = 7.0
testpaths = ["tests"]
[tool.pyright]
include = ["src", "tests"]
typeCheckingMode = "strict"
reportImportCycles = "warning"
reportUnusedImport = "warning"
reportUnusedClass = "warning"
reportUnusedFunction = "warning"
reportUnusedVariable = "warning"
reportDuplicateImport = "warning"
reportPrivateUsage = "warning"
reportConstantRedefinition = "warning"
reportUninitializedInstanceVariable = "warning"
reportUnknownParameterType = "warning"
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "warning"
reportUnknownVariableType = "warning"
reportUnknownMemberType = "warning"
reportMissingParameterType = "warning"
reportMissingTypeArgument = "none"
reportUnnecessaryIsInstance = "warning"
reportUnnecessaryCast = "warning"
reportUnnecessaryComparison = "warning"
reportUnnecessaryContains = "warning"
reportUnusedCallResult = "warning"
reportUnusedExpression = "warning"
reportUnnecessaryTypeIgnoreComment = "warning"
reportImplicitOverride = "warning"
reportShadowedImports = "warning"
reportDeprecated = "warning"
reportMissingImports = true
reportMissingTypeStubs = false
[tool.pylint.main]
ignore-paths = "^(?!src|tests).*$"
extension-pkg-whitelist = ["pydantic"]
[tool.pylint.messages_control]
max-line-length = 88
disable = [
"fixme",
"invalid-name",
"line-too-long",
"unnecessary-pass",
"unnecessary-ellipsis",
"too-few-public-methods",
"import-outside-toplevel",
"missing-class-docstring",
"missing-module-docstring",
"missing-function-docstring",
]
[tool.isort]
profile = "black"
line_length = 88
src_paths = ["src", "tests"]
float_to_top = true
include_trailing_comma = true
honor_noqa = true
quiet = true
[tool.ruff]
include = ["src/**/*.py", "tests/**/*.py"]
respect-gitignore = true
# Same as Black.
line-length = 88
indent-width = 4
target-version = "py37"
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
# "D", # pydocstyle
"F", # pyflakes
"UP", # pyupgrade
# "I", # isort (missing-required-import)
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PIE", # flake8-pie
"RSE", # flake8-raise
# "ANN",# flake8-annotations
"A",# flake8-builtins
"COM",# flake8-commas
"PT",# flake8-pytest-style
"Q",# flake8-quotes
"RET",# flake8-return
"SIM",# flake8-simplify
"ARG",# flake8-unused-arguments
"PTH",# flake8-use-pathlib
# "ERA",# eradicate
"PLW",# pylint-specific warnings
"PLE",# pylint-specific errors
"PLR",# pylint-specific refactors
"PLC",# pylint-specific conventions
"RUF",# ruff-specific
"TRY",# tryceratops
]
ignore = [
# "E501", # line too long, handled by black
# "B008", # do not perform function calls in argument defaults
"PLR0913", # too many arguments (n > 5)
"PLR2004", # magic value used in comparison
]
# Avoid trying to fix flake8-bugbear (`B`) violations.
# Allow autofix for all enabled rules (when `--fix`) is provided.
# autofix F401=unused-imports
fixable = ["W", "E", "COM", "F401"]
unfixable = []
# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py3{7,8,9,10,11,12}
skip_missing_interpreters = true
toxworkdir = /tmp/.tox
minversion = 4.0
[testenv]
recreate = true
extras = tests
commands =
python -m pytest {posargs}
"""