-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pylintrc
98 lines (88 loc) · 4.01 KB
/
.pylintrc
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
[MAIN]
# Files or directories to be skipped. They should be base names, not paths.
ignore=build,out,libs
[BASIC]
# Use the Parameter Documentation checker from pylint in addition to pydocstyle
# Primary reason: https://github.com/PyCQA/pydocstyle/issues/461 and related issues
# See http://pylint.pycqa.org/en/latest/technical_reference/extensions.html#pylint-extensions-docparams for details
default-docstring-type=google
# Allow any snake-cased variable names with 1 to 30 chars
# See https://www.reddit.com/r/learnpython/comments/2uiz96/single_letter_variable_names/
# See https://stackoverflow.com/a/49011908/9168401
# Do not allow two underscores in a row
# See https://stackoverflow.com/questions/30022815/regex-do-not-allow-character-appear-more-than-2-consecutively
# See https://stackoverflow.com/questions/17973233/regular-expression-for-no-more-than-two-repeated-letters-digits/17973807
variable-rgx=^(?!.*([_])\1)^(?=.{1,30}$)[a-z_][a-z0-9_]{0,}$
[FORMAT]
# Following https://github.com/psf/black/blob/master/docs/compatible_configs.md#black-compatible-configurations
max-line-length=120
[LOGGING]
# Format style used to check logging format string. `old` means using %
# formatting, `new` is for `{}` formatting,and `fstr` is for f-strings.
logging-format-style=new
[MESSAGES CONTROL]
# Disable the following because of:
# broad-except: Usually no big deal
# invalid-name: Stylistic decision
# no-member: Largely checked by mypy
# too-few-public-methods: So what?
# too-many-public-methods: So what?
# too-many-arguments: So what?
# too-many-branches: Cannot be avoided sometimes.
# too-many-lines: Cannot be avoided sometimes.
# too-many-locals: Cannot be avoided sometimes.
# too-many-instance-attributes: Cannot be avoided sometimes.
# too-many-statements: Cannot be avoided sometimes.
# global-statement: Totally legitimate.
# protected-access: Accessing protected members (i.e. with underscore) is anyway subject to gentleman's agreement only
# use-a-generator: That is my decision.
# useless-param-doc: Compliance to other linters.
# useless-type-doc: Compliance to other linters.
# missing-return-type-doc: Taken care of by mypy.
# missing-yield-type-doc: Taken care of by mypy.
# missing-type-doc: Taken care of by mypy.
# missing-yield-doc: Usually sufficiently described in summary.
# missing-return-doc: Usually sufficiently described in summary.
# import-error: Flaky and will anyway be detected through failing runtime tests
# DISABLE as of regression from PYLINT 2.* to 3.*
# consider-alternative-union-syntax
# c-extension-no-member: See https://pylint.pycqa.org/en/v3.2.6/user_guide/messages/error/no-member.html
# magic-value-comparison: Not critical
# deprecated-typing-alias: Include again once dropping support for Python < 3.9 (https://peps.python.org/pep-0585/)
# consider-using-assignment-expr: Include again once dropping support for Python < 3.9
# See https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/consider-using-assignment-expr.html)
# deprecated-module
# consider-using-tuple: No performance impact/benefit (only style).
# See https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/consider-using-tuple.html
disable=broad-except,
invalid-name,
no-member,
too-few-public-methods,
too-many-public-methods,
too-many-arguments,
too-many-branches,
too-many-lines,
too-many-locals,
too-many-instance-attributes,
too-many-statements,
global-statement,
protected-access,
use-a-generator,
useless-param-doc,
useless-type-doc,
missing-return-type-doc,
missing-yield-type-doc,
missing-type-doc,
missing-yield-doc,
missing-return-doc,
missing-raises-doc,
import-error,
consider-alternative-union-syntax,
c-extension-no-member,
magic-value-comparison,
deprecated-typing-alias,
consider-using-assignment-expr,
deprecated-module,
consider-using-tuple
[PARAMETER DOCUMENTATION]
default-docstring-type = google