-
Notifications
You must be signed in to change notification settings - Fork 57
/
.pylintrc
121 lines (98 loc) · 3.81 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[MESSAGES CONTROL]
# List of checkers and warnings to enable.
enable=
indexing-exception,
old-raise-syntax,
logging-not-lazy,
# List of checkers and warnings to disable.
# TODO: Shrink this list to as small as possible.
disable=
attribute-defined-outside-init,
bad-option-value,
bare-except,
broad-except,
c-extension-no-member,
design,
file-ignored,
fixme,
global-statement,
import-error,
import-outside-toplevel,
locally-disabled,
misplaced-comparison-constant,
multiple-imports,
no-self-use,
relative-import,
similarities,
suppressed-message,
ungrouped-imports,
unsubscriptable-object,
useless-object-inheritance, # Remove once all bots are on Python 3.
useless-suppression,
wrong-import-order,
wrong-import-position,
# FIXME: To be removed. Leftovers from Python 3 migration.
consider-using-with,
raise-missing-from,
super-with-arguments,
use-a-generator,
consider-using-generator,
unspecified-encoding, # This is Linux only.
broad-exception-raised,
[BASIC]
# Regular expression which should only match the name
# of functions or classes which do not require a docstring.
no-docstring-rgx=(__.*__|main)
# Min length in lines of a function that requires a docstring.
docstring-min-length=10
# Regular expression which should only match correct module names. The
# leading underscore is sanctioned for private modules by Google's style
# guide.
#
# There are exceptions to the basic rule (_?[a-z][a-z0-9_]*) to cover
# requirements of Python's module system and of the presubmit framework.
module-rgx=^(_?[a-z][a-z0-9_]*)|__init__|__main__|PRESUBMIT|PRESUBMIT_unittest$
# Regular expression which should only match correct module level names.
const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
# Regular expression which should only match correct class attribute.
class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
# Regular expression which should only match correct class names.
class-rgx=^_?[A-Z][a-zA-Z0-9]*$
# Regular expression which should only match correct function names.
# 'camel_case' and 'snake_case' group names are used for consistency of naming
# styles across functions and methods.
function-rgx=^(?:(?P<exempt>setUp|tearDown|setUpModule|tearDownModule)|(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
# Regular expression which should only match correct method names.
# 'camel_case' and 'snake_case' group names are used for consistency of naming
# styles across functions and methods. 'exempt' indicates a name which is
# consistent with all naming styles.
method-rgx=(?x)
^(?:(?P<exempt>_[a-z0-9_]+__|runTest|setUp|tearDown|setUpTestCase
|tearDownTestCase|setupSelf|tearDownClass|setUpClass
|(test|assert)_*[A-Z0-9][a-zA-Z0-9_]*|next)
|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9_]*)
|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$
# Regular expression which should only match correct instance attribute names.
attr-rgx=^_{0,2}[a-z][a-z0-9_]*$
# Regular expression which should only match correct argument names.
argument-rgx=^[a-z][a-z0-9_]*$
# Regular expression which should only match correct variable names.
variable-rgx=^[a-z][a-z0-9_]*$
# Regular expression which should only match correct list comprehension /
# generator expression variable names.
inlinevar-rgx=^[a-z][a-z0-9_]*$
# Good variable names which should always be accepted, separated by a comma.
good-names=main,_,maxDiff
# Bad variable names which should always be refused, separated by a comma.
bad-names=
# FIXME: Renable this.
# List of builtins function names that should not be used, separated by a comma.
#bad-builtin=input
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=80
# Maximum number of lines in a module
max-module-lines=99999
# String used as indentation unit.
indent-string=' '
[TYPECHECK]