-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pylintrc
245 lines (182 loc) · 8.28 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
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
# Lint Python modules using external checkers
[MASTER]
# Set the cache size for string objects.
cache-size=500
jobs=1
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=tests
[MESSAGES CONTROL]
# Ignoring some of the rules
# W0105 - Inline Comments.
# C0103 - Using lowwercase variables in __main__
# E0401 - Codacy error.
# disable=W0105,W0511,C0103,E0401
disable=all
enable= E0001,E0100,E0101,E0102,E0103,E0104,E0105,E0106,E0107,E0110,E0113,E0114,E0115,E0116,E0117,E0108,
E0202,E0203,E0211,E0236,E0238,E0239,E0240,E0241,E0301,E0302,E0601,E0603,E0604,E0701,
E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1102,E1111,E0112,E1120,E1121,E1123,E1124,E1125,E1126,
E1127,E1132,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,
C0123,C0200,C0303,C1001,
W0101,W0102,W0104,W0106,W0107,W0108,W0109,W0110,W0120,W0122,W0124,W0150,W0199,W0222,W0233,W0404,W0410,W0601,W0602,W0604,W0611,W0612,W0622,W0623,W0702,W0705,W0711,W1300,W1301,W1302,W1303,W1305,W1306,W1307
R0102,R0201,R0202,R0203
################################################################################
[REPORTS]
output-format=parseable
# Include message's id in output
include-ids=yes
# Tells whether to display a full report or only the messages
# reports=yes
# Python expression which should return a note less than 10 (10 is the highest
# note).You have access to the variables errors warning, statement which
# respectivly contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (R0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
################################################################################
[BASIC]
good-names=i,j,k,_
# Include a hint for the correct naming format with invalid-name
include-naming-hint=yes
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty
# 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
function-rgx=[a-z_][a-z0-9_]{1,30}$
# Regular expression which should only match correct method names
method-rgx=[a-z_][a-z0-9_]{1,30}$
# Regular expression which should only match correct instance attribute names
attr-rgx=[a-z_][a-z0-9_]{1,30}$
# Regular expression which should only match correct argument names
argument-rgx=[a-z_][a-z0-9_]{1,30}$
# Regular expression which should only match correct variable names
variable-rgx=[a-z_][a-z0-9_]{1,30}$
# Regular expression which should only match correct list comprehension /
# generator expression variable names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Regular expression which should only match correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Regular expression which should only match correct module level names
const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
# List of builtins function names that should not be used, separated by a comma
bad-functions=apply,input
################################################################################
################################################################################
[TYPECHECK]
# Tells wether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
################################################################################
# checks for
# * unused variables / imports
# * undefined variables
# * redefinition of variable from builtins or from an outer scope
# * use of variable before assigment
################################################################################
[VARIABLES]
# Tells wether we should check for unused import in __init__ files.
init-import=no
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb
################################################################################
################################################################################
[CLASSES]
# List of interface methods to ignore, separated by a comma.
ignore-iface-methods=
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
################################################################################
# checks for sign of poor/misdesign:
# * number of methods, attributes, local variables...
# * size, complexity of functions, methods
################################################################################
[DESIGN]
# Maximum number of arguments for function / method
max-args=5
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of branch for function / method body
max-branchs=12
# Maximum number of statements in function / method body
max-statements=50
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
################################################################################
# checks for
# * external modules dependencies
# * relative / wildcard imports
# * cyclic imports
# * uses of deprecated modules
################################################################################
[IMPORTS]
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=optparse,regsub,rexec,TERMIOS,Bastion
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report R0402 must not be disabled)
import-graph=
# Create a graph of external dependencies in the given file (report R0402 must
# not be disabled)
ext-import-graph=
# Create a graph of internal dependencies in the given file (report R0402 must
# not be disabled)
int-import-graph=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
################################################################################
# checks for :
# * unauthorized constructions
# * strict indentation
# * line length
# * use of <> instead of !=
################################################################################
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=100
# Allow the body of an if to be on the same line as the
# test if there is no else.
single-line-if-stmt=no
# Maximum number of lines in a module
max-module-lines=1000
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# String used as indentation unit.
indent-string=' '
################################################################################
# checks for:
# * warning notes in the code like FIXME, XXX
# * PEP 263: source code with non ascii character but no encoding declaration
################################################################################
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO,DONE
# checks for similarities and duplicated code. This computation may be
# memory / CPU intensive, so you should disable it if you experiments some
# problems.
################################################################################
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=4
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes