Adds pyproject.toml.
[python_utils.git] / pyproject.toml
1 [tool.mypy]
2 python_version="3.8"
3 ignore_missing_imports=true
4 namespace_packages=true
5 mypy_path="/home/scott/lib/python_modules"
6 pretty=true
7 exclude = [
8     "dateparse_utilsParser.py$",
9     "dateparse_utilsLexer.py$",
10     "dateparse_utilsListener.py$",
11 ]
12
13 [tool.black]
14 color=true
15 skip-string-normalization=true
16 line-length=100
17
18 [tool.isort]
19 profile="black"
20 sections="FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
21 no_lines_before="STDLIB"
22
23 [tool.pylint]
24 [tool.pylint.MASTER]
25
26 # A comma-separated list of package or module names from where C extensions may
27 # be loaded. Extensions are loading into the active Python interpreter and may
28 # run arbitrary code.
29 extension-pkg-allow-list="cv2"
30
31 # A comma-separated list of package or module names from where C extensions may
32 # be loaded. Extensions are loading into the active Python interpreter and may
33 # run arbitrary code. (This is an alternative name to extension-pkg-allow-list
34 # for backward compatibility.)
35 #extension-pkg-whitelist=
36
37 # Return non-zero exit code if any of these messages/categories are detected,
38 # even if score is above --fail-under value. Syntax same as enable. Messages
39 # specified are enabled, while categories only check already-enabled messages.
40 #fail-on=
41
42 # Specify a score threshold to be exceeded before program exits with error.
43 fail-under=8.0
44
45 # Files or directories to be skipped. They should be base names, not paths.
46 ignore="CVS"
47
48 # Add files or directories matching the regex patterns to the ignore-list. The
49 # regex matches against paths and can be in Posix or Windows format.
50 #ignore-paths=
51
52 # Files or directories matching the regex patterns are skipped. The regex
53 # matches against base names, not paths.
54 #ignore-patterns=
55
56 # Python code to execute, usually for sys.path manipulation such as
57 # pygtk.require().
58 #init-hook=
59
60 # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
61 # number of processors available to use.
62 jobs=1
63
64 # Control the amount of potential inferred values when inferring a single
65 # object. This can help the performance when dealing with large functions or
66 # complex, nested conditions.
67 limit-inference-results=100
68
69 # List of plugins (as comma separated values of python module names) to load,
70 # usually to register additional checkers.
71 #load-plugins=
72
73 # Pickle collected data for later comparisons.
74 persistent="yes"
75
76 # Minimum Python version to use for version dependent checks. Will default to
77 # the version used to run pylint.
78 py-version=3.8
79
80 # When enabled, pylint would attempt to guess common misconfiguration and emit
81 # user-friendly hints instead of false-positive error messages.
82 suggestion-mode="yes"
83
84 # Allow loading of arbitrary C extensions. Extensions are imported into the
85 # active Python interpreter and may run arbitrary code.
86 unsafe-load-any-extension="no"
87
88 [tool.pylint.'MESSAGES CONTROL']
89
90 # Only show warnings with the listed confidence levels. Leave empty to show
91 # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
92 #confidence=
93
94 # Disable the message, report, category or checker with the given id(s). You
95 # can either give multiple identifiers separated by comma (,) or put this
96 # option multiple times (only on the command line, not in the configuration
97 # file where it should appear only once). You can also use "--disable=all" to
98 # disable everything first and then reenable specific checks. For example, if
99 # you want to run only the similarities checker, you can use "--disable=all
100 # --enable=similarities". If you want to run only the classes checker, but have
101 # no Warning level messages displayed, use "--disable=all --enable=classes
102 # --disable=W".
103 disable="invalid-name, missing-function-docstring, useless-object-inheritance, unspecified-encoding, import-outside-toplevel, raw-checker-failed, bad-inline-option, locally-disabled, line-too-long, too-few-public-methods, file-ignored, suppressed-message, useless-suppression, no-else-return, no-else-raise, no-else-break, deprecated-pragma, unnecessary-pass, use-symbolic-message-instead, broad-except"
104
105 # Enable the message, report, category or checker with the given id(s). You can
106 # either give multiple identifier separated by comma (,) or put this option
107 # multiple time (only on the command line, not in the configuration file where
108 # it should appear only once). See also the "--disable" option for examples.
109 enable="c-extension-no-member"
110
111 [tool.pylint.REPORTS]
112
113 # Python expression which should return a score less than or equal to 10. You
114 # have access to the variables 'error', 'warning', 'refactor', and 'convention'
115 # which contain the number of messages in each category, as well as 'statement'
116 # which is the total number of statements analyzed. This score is used by the
117 # global evaluation report (RP0004).
118 evaluation="10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)"
119
120 # Template used to display messages. This is a python new-style format string
121 # used to format the message information. See doc for all details.
122 #msg-template=
123
124 # Set the output format. Available formats are text, parseable, colorized, json
125 # and msvs (visual studio). You can also give a reporter class, e.g.
126 # mypackage.mymodule.MyReporterClass.
127 output-format="text"
128
129 # Tells whether to display a full report or only the messages.
130 reports="no"
131
132 # Activate the evaluation score.
133 score="no"
134
135 [tool.pylint.REFACTORING]
136
137 # Maximum number of nested blocks for function / method body
138 max-nested-blocks=5
139
140 # Complete name of functions that never returns. When checking for
141 # inconsistent-return-statements if a never returning function is called then
142 # it will be considered as an explicit return statement and no message will be
143 # printed.
144 never-returning-functions="sys.exit,argparse.parse_error"
145
146 [tool.pylint.BASIC]
147
148 # Naming style matching correct argument names.
149 argument-naming-style="snake_case"
150
151 # Regular expression matching correct argument names. Overrides argument-
152 # naming-style.
153 #argument-rgx=
154
155 # Naming style matching correct attribute names.
156 attr-naming-style="snake_case"
157
158 # Regular expression matching correct attribute names. Overrides attr-naming-
159 # style.
160 #attr-rgx=
161
162 # Bad variable names which should always be refused, separated by a comma.
163 bad-names="foo, baz, toto, tutu, tata, caca"
164
165 # Bad variable names regexes, separated by a comma. If names match any regex,
166 # they will always be refused
167 #bad-names-rgxs=
168
169 # Naming style matching correct class attribute names.
170 class-attribute-naming-style="any"
171
172 # Regular expression matching correct class attribute names. Overrides class-
173 # attribute-naming-style.
174 #class-attribute-rgx=
175
176 # Naming style matching correct class constant names.
177 class-const-naming-style="UPPER_CASE"
178
179 # Regular expression matching correct class constant names. Overrides class-
180 # const-naming-style.
181 #class-const-rgx=
182
183 # Naming style matching correct class names.
184 class-naming-style="PascalCase"
185
186 # Regular expression matching correct class names. Overrides class-naming-
187 # style.
188 #class-rgx=
189
190 # Naming style matching correct constant names.
191 const-naming-style="UPPER_CASE"
192
193 # Regular expression matching correct constant names. Overrides const-naming-
194 # style.
195 #const-rgx=
196
197 # Minimum line length for functions/classes that require docstrings, shorter
198 # ones are exempt.
199 docstring-min-length=-1
200
201 # Naming style matching correct function names.
202 function-naming-style="snake_case"
203
204 # Regular expression matching correct function names. Overrides function-
205 # naming-style.
206 #function-rgx=
207
208 # Good variable names which should always be accepted, separated by a comma.
209 good-names="i, j, k, x, y, z, e, ex"
210
211 # Good variable names regexes, separated by a comma. If names match any regex,
212 # they will always be accepted
213 #good-names-rgxs=
214
215 # Include a hint for the correct naming format with invalid-name.
216 include-naming-hint="no"
217
218 # Naming style matching correct inline iteration names.
219 inlinevar-naming-style="any"
220
221 # Regular expression matching correct inline iteration names. Overrides
222 # inlinevar-naming-style.
223 #inlinevar-rgx=
224
225 # Naming style matching correct method names.
226 method-naming-style="snake_case"
227
228 # Regular expression matching correct method names. Overrides method-naming-
229 # style.
230 #method-rgx=
231
232 # Naming style matching correct module names.
233 module-naming-style="snake_case"
234
235 # Regular expression matching correct module names. Overrides module-naming-
236 # style.
237 #module-rgx=
238
239 # Colon-delimited sets of names that determine each other's naming style when
240 # the name regexes allow several styles.
241 #name-group=
242
243 # Regular expression which should only match function or class names that do
244 # not require a docstring.
245 no-docstring-rgx="^_"
246
247 # List of decorators that produce properties, such as abc.abstractproperty. Add
248 # to this list to register other decorators that produce valid properties.
249 # These decorators are taken in consideration only for invalid-name.
250 property-classes="abc.abstractproperty"
251
252 # Naming style matching correct variable names.
253 variable-naming-style="snake_case"
254
255 # Regular expression matching correct variable names. Overrides variable-
256 # naming-style.
257 #variable-rgx=
258
259 [tool.pylint.MISCELLANEOUS]
260
261 # List of note tags to take in consideration, separated by a comma.
262 notes="FIXME, XXX, TODO"
263
264 # Regular expression of note tags to take in consideration.
265 #notes-rgx=
266
267 [tool.pylint.TYPECHECK]
268
269 # List of decorators that produce context managers, such as
270 # contextlib.contextmanager. Add to this list to register other decorators that
271 # produce valid context managers.
272 contextmanager-decorators="contextlib.contextmanager"
273
274 # List of members which are set dynamically and missed by pylint inference
275 # system, and so shouldn't trigger E1101 when accessed. Python regular
276 # expressions are accepted.
277 generated-members="io.*,cv2.*"
278
279 # Tells whether missing members accessed in mixin class should be ignored. A
280 # class is considered mixin if its name matches the mixin-class-rgx option.
281 ignore-mixin-members="yes"
282
283 # Tells whether to warn about missing members when the owner of the attribute
284 # is inferred to be None.
285 ignore-none="yes"
286
287 # This flag controls whether pylint should warn about no-member and similar
288 # checks whenever an opaque object is returned when inferring. The inference
289 # can return multiple potential results while evaluating a Python object, but
290 # some branches might not be evaluated, which results in partial inference. In
291 # that case, it might be useful to still emit no-member and other checks for
292 # the rest of the inferred objects.
293 ignore-on-opaque-inference="yes"
294
295 # List of class names for which member attributes should not be checked (useful
296 # for classes with dynamically set attributes). This supports the use of
297 # qualified names.
298 ignored-classes="optparse.Values,thread._local,_thread._local"
299
300 # List of module names for which member attributes should not be checked
301 # (useful for modules/projects where namespaces are manipulated during runtime
302 # and thus existing member attributes cannot be deduced by static analysis). It
303 # supports qualified module names, as well as Unix pattern matching.
304 #ignored-modules=
305
306 # Show a hint with possible names when a member name was not found. The aspect
307 # of finding the hint is based on edit distance.
308 missing-member-hint="yes"
309
310 # The minimum edit distance a name should have in order to be considered a
311 # similar match for a missing member name.
312 missing-member-hint-distance=1
313
314 # The total number of similar names that should be taken in consideration when
315 # showing a hint for a missing member.
316 missing-member-max-choices=1
317
318 # Regex pattern to define which classes are considered mixins ignore-mixin-
319 # members is set to 'yes'
320 mixin-class-rgx=".*[Mm]ixin"
321
322 # List of decorators that change the signature of a decorated function.
323 signature-mutators="thread_utils.background_thread"
324
325 [tool.pylint.VARIABLES]
326
327 # List of additional names supposed to be defined in builtins. Remember that
328 # you should avoid defining new builtins when possible.
329 #additional-builtins=
330
331 # Tells whether unused global variables should be treated as a violation.
332 allow-global-unused-variables="yes"
333
334 # List of names allowed to shadow builtins
335 #allowed-redefined-builtins=
336
337 # List of strings which can identify a callback function by name. A callback
338 # name must start or end with one of those strings.
339 callbacks="cb_, _cb"
340
341 # A regular expression matching the name of dummy variables (i.e. expected to
342 # not be used).
343 dummy-variables-rgx="_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_"
344
345 # Argument names that match this expression will be ignored. Default to name
346 # with leading underscore.
347 ignored-argument-names="_.*|^ignored_|^unused_"
348
349 # Tells whether we should check for unused import in __init__ files.
350 init-import="no"
351
352 # List of qualified module names which can have objects that can redefine
353 # builtins.
354 redefining-builtins-modules="six.moves,past.builtins,future.builtins,builtins,io"
355
356 [tool.pylint.FORMAT]
357
358 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
359 #expected-line-ending-format=
360
361 # Regexp for a line that is allowed to be longer than the limit.
362 #ignore-long-lines="^\s*(# )?<?https?://\S+>?$"
363
364 # Number of spaces of indent required inside a hanging or continued line.
365 indent-after-paren=4
366
367 # String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
368 # tab).
369 indent-string='    '
370
371 # Maximum number of characters on a single line.
372 max-line-length=100
373
374 # Maximum number of lines in a module.
375 max-module-lines=1000
376
377 # Allow the body of a class to be on the same line as the declaration if body
378 # contains single statement.
379 single-line-class-stmt="no"
380
381 # Allow the body of an if to be on the same line as the test if there is no
382 # else.
383 single-line-if-stmt="no"
384
385 [tool.pylint.STRING]
386
387 # This flag controls whether inconsistent-quotes generates a warning when the
388 # character used as a quote delimiter is used inconsistently within a module.
389 check-quote-consistency="no"
390
391 # This flag controls whether the implicit-str-concat should generate a warning
392 # on implicit string concatenation in sequences defined over several lines.
393 check-str-concat-over-line-jumps="no"
394
395 [tool.pylint.LOGGING]
396
397 # The type of string formatting that logging methods do. `old` means using %
398 # formatting, `new` is for `{}` formatting.
399 logging-format-style="old"
400
401 # Logging modules to check that the string format arguments are in logging
402 # function parameter format.
403 logging-modules="logging"
404
405 [tool.pylint.SPELLING]
406
407 # Limits count of emitted suggestions for spelling mistakes.
408 max-spelling-suggestions=4
409
410 # Spelling dictionary name. Available dictionaries: none. To make it work,
411 # install the 'python-enchant' package.
412 #spelling-dict=
413
414 # List of comma separated words that should be considered directives if they
415 # appear and the beginning of a comment and should not be checked.
416 spelling-ignore-comment-directives="fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:"
417
418 # List of comma separated words that should not be checked.
419 #spelling-ignore-words=
420
421 # A path to a file that contains the private dictionary; one word per line.
422 #spelling-private-dict-file=
423
424 # Tells whether to store unknown words to the private dictionary (see the
425 # --spelling-private-dict-file option) instead of raising a message.
426 spelling-store-unknown-words="no"
427
428 [tool.pylint.SIMILARITIES]
429
430 # Comments are removed from the similarity computation
431 ignore-comments="yes"
432
433 # Docstrings are removed from the similarity computation
434 ignore-docstrings="yes"
435
436 # Imports are removed from the similarity computation
437 ignore-imports="no"
438
439 # Signatures are removed from the similarity computation
440 ignore-signatures="no"
441
442 # Minimum lines number of a similarity.
443 min-similarity-lines=4
444
445 [tool.pylint.DESIGN]
446
447 # List of regular expressions of class ancestor names to ignore when counting
448 # public methods (see R0903)
449 #exclude-too-few-public-methods=
450
451 # List of qualified class names to ignore when counting class parents (see
452 # R0901)
453 #ignored-parents=
454
455 # Maximum number of arguments for function / method.
456 max-args=6
457
458 # Maximum number of attributes for a class (see R0902).
459 max-attributes=7
460
461 # Maximum number of boolean expressions in an if statement (see R0916).
462 max-bool-expr=5
463
464 # Maximum number of branch for function / method body.
465 max-branches=13
466
467 # Maximum number of locals for function / method body.
468 max-locals=17
469
470 # Maximum number of parents for a class (see R0901).
471 max-parents=7
472
473 # Maximum number of public methods for a class (see R0904).
474 max-public-methods=20
475
476 # Maximum number of return / yield for function / method body.
477 max-returns=8
478
479 # Maximum number of statements in function / method body.
480 max-statements=66
481
482 # Minimum number of public methods for a class (see R0903).
483 min-public-methods=2
484
485 [tool.pylint.CLASSES]
486
487 # Warn about protected attribute access inside special methods
488 check-protected-access-in-special-methods="no"
489
490 # List of method names used to declare (i.e. assign) instance attributes.
491 defining-attr-methods="__init__, __new__, setUp, __post_init__"
492
493 # List of member names, which should be excluded from the protected access
494 # warning.
495 exclude-protected="_asdict, _fields, _replace, _source, _make"
496
497 # List of valid names for the first argument in a class method.
498 valid-classmethod-first-arg="cls"
499
500 # List of valid names for the first argument in a metaclass class method.
501 valid-metaclass-classmethod-first-arg="cls"
502
503 [tool.pylint.IMPORTS]
504
505 # List of modules that can be imported at any level, not just the top level
506 # one.
507 #allow-any-import-level=
508
509 # Allow wildcard imports from modules that define __all__.
510 allow-wildcard-with-all="no"
511
512 # Analyse import fallback blocks. This can be used to support both Python 2 and
513 # 3 compatible code, which means that the block might have code that exists
514 # only in one or another interpreter, leading to false positives when analysed.
515 analyse-fallback-blocks="no"
516
517 # Deprecated modules which should not be used, separated by a comma.
518 #deprecated-modules=
519
520 # Output a graph (.gv or any supported image format) of external dependencies
521 # to the given file (report RP0402 must not be disabled).
522 #ext-import-graph=
523
524 # Output a graph (.gv or any supported image format) of all (i.e. internal and
525 # external) dependencies to the given file (report RP0402 must not be
526 # disabled).
527 #import-graph=
528
529 # Output a graph (.gv or any supported image format) of internal dependencies
530 # to the given file (report RP0402 must not be disabled).
531 #int-import-graph=
532
533 # Force import order to recognize a module as part of the standard
534 # compatibility libraries.
535 #known-standard-library=
536
537 # Force import order to recognize a module as part of a third party library.
538 known-third-party="enchant"
539
540 # Couples of modules and preferred modules, separated by a comma.
541 #preferred-modules=
542
543 [tool.pylint.EXCEPTIONS]
544
545 # Exceptions that will emit a warning when being caught. Defaults to
546 # "BaseException, Exception".
547 overgeneral-exceptions="BaseException, Exception"