-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
284 lines (221 loc) · 7.35 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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
#############
## PROJECT ##
#############
[project]
name = "pypara"
version = "0.1.1"
description = "Currencies, Monetary Value Arithmetic/Conversion and Some Type Convenience"
keywords = ["finance"]
readme = "README.md"
license = { text = "BSD License" }
authors = [{ name = "Vehbi Sinan Tunalioglu", email = "[email protected]" }]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"python-dateutil<3.0",
"typing_extensions; python_version<'3.10'",
]
[project.urls]
Homepage = "https://github.com/vst/pypara"
Documentation = "https://github.com/vst/pypara#readme"
Repository = "https://github.com/vst/pypara.git"
Changelog = "https://github.com/vst/pypara/blob/main/CHANGELOG.md"
##################
## BUILD SYSTEM ##
##################
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
######################
## TOOL: SETUPTOOLS ##
######################
[tool.setuptools.packages.find]
where = ["."]
include = ["pypara*"]
namespaces = false
[tool.setuptools.package-data]
pypara = ["py.typed"]
#################
## TOOL: BLACK ##
#################
[tool.black]
line-length = 120
target_version = ["py39"]
#################
## TOOL: ISORT ##
#################
[tool.isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true
################
## TOOL: mypy ##
################
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_any_unimported = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_ignores = true
###################
## TOOL: pyright ##
###################
[tool.pyright]
## Provide platform information:
pythonPlatform = "Linux"
pythonVersion = "3.10"
## Typecheck following directories:
include = ["pypara", "tests"]
## Exclude following directories from typechecking:
exclude = []
## Ignore some files:
ignore = []
## We want strict type-checking mode:
typeCheckingMode = "basic"
## Demote (some) report groups to "warning" because mypy is our primary source:
# reportGeneralTypeIssues = "warning"
# reportMissingImports = "warning"
# reportMissingTypeStubs = "warning"
# reportPropertyTypeMismatch = "warning"
# reportUnusedImport = "warning"
####################
## TOOL: coverage ##
####################
[tool.coverage.run]
source = ["."]
##################
## TOOL: flake8 ##
##################
## Note: When this section was added, there was no pyproject.toml
## support of flake8 which is a very disputed issue:
##
## https://github.com/PyCQA/flake8/issues/234
##
## We are now using Flake8-pyproject flake8 plugin to use
## `pyproject.toml`.
[tool.flake8]
## Define error messages to be ignored:
ignore = [
"E266", ## We want double hash to be allowed for comments.
"F811", ## Still problem with @overload.
"T202", ## We are not on Python 2.x.
"TC001", ## We will not use TYPE_CHECKING block for a while.
"TC002", ## We will not use TYPE_CHECKING block for a while.
"TC003", ## We will not use TYPE_CHECKING block for a while.
"TC006", ## Needs testing.
"D100", ## We do not intend to add docstring to all definitions yet.
"D101", ## We do not intend to add docstring to all definitions yet.
"D102", ## We do not intend to add docstring to all definitions yet.
"D103", ## We do not intend to add docstring to all definitions yet.
"D104", ## We do not intend to add docstring to all definitions yet.
"D105", ## We do not intend to add docstring to all definitions yet.
"D107", ## We do not intend to add docstring to all definitions yet.
"D200", ## No need to fit one-line docstrings on one line with quotes.
"D205", ## We are starting with a blank line.
"D400", ## Plugin is a little confused.
"D401", ## We will be imperative later.
]
## Define files and directories to be excluded from checking:
exclude = [
"__pycache__",
"__static",
".cache",
".eggs",
".git",
".mypy_cache",
"*.egg-info",
"*.py[codi]",
"build",
"dev",
"dist",
]
## Defines maximum MCCABE complexity allowed (TODO: Gradually reduce to 5).
max-complexity = 7
## Defines the maximum line length.
max-line-length = 120
## Indicates that doctests to be run.
doctests = true
## Indicates that we want summary statistics of error messages, if any.
statistics = true
## Set Python version (for flake8-typing-imports flake8 plugin):
min_python_version = "3.10"
##########################
## PYLINT CONFIGURATION ##
##########################
[tool.pylint."messages control"]
## Set the line length:
max-line-length = 120
# ## Allow some special names which occur often due to our domain:
good-names = ["gt", "lt", "na", "of", "to"]
# ## Allow some names defined by regular expressions:
good-names-rgxs = [
"^[_abcdefghjkmnopqrstuvwxyz][_0-9]?$", ## Allow single letter or single letter followed by a single number (including underscore, excludign i,l).
"^[pqrx]s$", ## Allow plurals of some letters.
]
## Increase module line numbers:
max-module-lines = 4096
## Enable report summary:
reports = true
## Recurse into directories:
recursive = true
## Ignore some files:
ignore = []
## Enable all checks:
enable = ["all"]
## NOTE: Below list is compiled from a sample pylint run with all checks enabled.
## We will attend this list on an ongoing basis up until we enable all but a
## selected group of checks which we really want to ignore (REAL IGNORES). Such
## checks are grouped on the top of the list.
##
## Disable checks selectively:
disable = [
##################
## REAL IGNORES ##
##################
## There are some valid reasons that we duplicated code:
"duplicate-code",
## Allow locally disabling some messages:
"locally-disabled",
## Toggle once in a while to see what we suppressed:
"suppressed-message",
####################
## TO BE ATTENDED ##
####################
"missing-function-docstring", ## 46
"superfluous-parens", ## 24
"unused-argument", ## 22
"unnecessary-dunder-call", ## 14
"fixme", ## 12
"no-else-return", ## 11
"unidiomatic-typecheck", ## 8
"use-implicit-booleaness-not-comparison", ## 6
"too-many-public-methods", ## 6
"unsubscriptable-object", ## 5
"unnecessary-ellipsis", ## 5
"unneeded-not", ## 4
"too-few-public-methods", ## 4
"raise-missing-from", ## 4
"no-else-raise", ## 4
"missing-module-docstring", ## 4
"unused-variable", ## 2
"too-many-arguments", ## 2
"redefined-outer-name", ## 2
"missing-class-docstring", ## 2
"consider-using-f-string", ## 2
]