-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy path.pylintrc
332 lines (231 loc) · 9.58 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
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# # -*- mode: conf -*-
# Master {{{
[MASTER]
# List of package or module names from where C extensions may be loaded.
extension-pkg-whitelist=
# Blacklist the files/directories whose name are listed here.
ignore=
# Blacklist the files/directories whose name (not the path) match the patterns.
ignore-patterns=
# Python code to execute (usually for sys.path manipulation).
#init-hook=
# Parallelism (seems flaky: https://github.com/PyCQA/pylint/issues/374).
jobs=1
# List of plugins (as comma separated values of python modules names) to load.
load-plugins=
# Pickle collected data for later comparisons.
persistent=no
# Try to guess common misconfiguration and emit user-friendly hints.
suggestion-mode=yes
# Allow loading of arbitrary C extensions.
unsafe-load-any-extension=no
# }}}
# Messages control {{{
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels (empty == show all).
confidence=
# Enable the message, report, category or checker with the given ID(s).
enable=all
# Disable the message, report, category or checker with the given ID(s).
disable=abstract-method, # Too many false positive :/
bad-whitespace, # Alignment is a good thing.
bad-continuation, # I kindly disagree :)
locally-disabled, # Sometime we need to disable a warning locally.
suppressed-message, # Don't pollute the output with useless info.
# }}}
# Basic {{{
[BASIC]
argument-naming-style=snake_case # Naming style for argument names.
attr-naming-style=snake_case # Naming style for attribute names.
class-attribute-naming-style=any # Naming style for class attribute names.
class-naming-style=PascalCase # Naming style for class names.
const-naming-style=UPPER_CASE # Naming style for constant names.
function-naming-style=snake_case # Naming style for function names.
inlinevar-naming-style=snake_case # Naming style for inline iteration names.
method-naming-style=snake_case # Naming style for method names.
module-naming-style=snake_case # Naming style for correct module names.
variable-naming-style=snake_case # Naming style for variable names.
# Regex for <category> names (overrides <category>-naming-style).
#argument-rgx=
#attr-rgx=
#class-attribute-rgx=
#class-rgx=
#const-rgx=
#function-rgx=
#inlinevar-rgx=
#method-rgx=
#module-rgx=
#variable-rgx=
# Variable names that should always be refused.
bad-names=foo,bar,baz,qux # Metasyntactic variable.
# Variable names that should always be accepted.
good-names=i,j,k, # Loop
exc, # Exception
fp, # File handle
_ # Unused
# Minimum line length for functions/classes that require docstrings.
docstring-min-length=-1
# Include a hint for the correct naming format with invalid-name
include-naming-hint=yes
# Colon-delimited sets of names that determine each other's naming style.
# See # http://pylint.pycqa.org/en/latest/user_guide/options.html#cmdoption-name-group
name-group=
# Regex that match function or class names that do not require a docstring.
no-docstring-rgx=^_ # ignore private functions/methods and dunder methods.
# List of decorators that produce properties.
property-classes=abc.abstractproperty
# }}}
# Reports {{{
[REPORTS]
# Python expression which should return a note less than 10.
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages (see doc for all details).
msg-template={C}:{line:3d},{column:2d}: {msg} ({symbol})
# Output format.
output-format=colorized
# yes: display a full report / no: only display the messages.
reports=no
# Activate the evaluation score.
score=yes
# }}}
# Refactoring {{{
[REFACTORING]
# Maximum number of nested blocks for function/method body.
max-nested-blocks=5
# Complete name of functions that never returns.
never-returning-functions=optparse.Values,sys.exit
# }}}
# Similarities {{{
[SIMILARITIES]
ignore-comments=yes # Ignore comments when computing similarities?
ignore-docstrings=yes # Ignore docstrings when computing similarities?
ignore-imports=yes # Ignore imports when computing similarities?
min-similarity-lines=5 # Minimum lines number of a similarity.
# }}}
# Typecheck {{{
[TYPECHECK]
# List of decorators that produce context managers.
contextmanager-decorators=contextlib.contextmanager
# Members which are set dynamically and missed by pylint inference system,
# and so shouldn't trigger E1101 when accessed.
# Python regular expressions are accepted.
generated-members=
# Tells whether 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
# Do not warn about no-member and similar checks for opaque objects?
ignore-on-opaque-inference=yes
# List of class names for which member attributes should not be checked.
ignored-classes=optparse.Values,thread._local,_thread._local
# List of module names for which member attributes should not be checked.
# It supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Missing member name.
missing-member-hint=yes # Show a hint with possible names.
missing-member-max-choices=1 # Max number of hint to propose.
missing-member-hint-distance=1 # Min edit distance for an hint.
# }}}
# Variables {{{
[VARIABLES]
# List of additional names supposed to be defined in builtins.
additional-builtins=
# Should unused global variables be treated as a violation?
allow-global-unused-variables=yes
# List of strings which can identify a callback function by name.
callbacks=cb_,_cb
# A regex matching the name of dummy variables (i.e. expectedly unused).
dummy-variables-rgx=_(?:[a-zA-Z0-9]+[a-zA-Z0-9_]*)?$
# Argument names that match this expression will be ignored.
ignored-argument-names=_(?:[a-zA-Z0-9]+[a-zA-Z0-9_]*)?$
# Check for unused import in __init__ files?
init-import=no
# List of qualified module names which can redefine builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins
# }}}
# Spelling {{{
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name (require the python-enchant/pyenchant package).
spelling-dict=en_US
# List words that should not be checked.
spelling-ignore-words=
# A path to a file that contains private dictionary (one word per line).
spelling-private-dict-file=.pylint-dict
# Store unknown words to the private dictionary instead of raising a message.
spelling-store-unknown-words=no
# }}}
# Format {{{
[FORMAT]
# Expected format of line ending (UNIX-like only).
expected-line-ending-format=LF
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit: 4 spaces (no tab).
indent-string=' '
max-line-length=88 # Maximum number of characters on a single line.
max-module-lines=1000 # Maximum number of lines in a module.
# List of optional constructs for which whitespace checking is disabled.
no-space-check=trailing-comma,dict-separator
single-line-class-stmt=no # Allow "class A: BODY" if BODY is a single statement.
single-line-if-stmt=no # Allow "if TEST: BODY" if there is no else.
# }}}
# Imports {{{
[IMPORTS]
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=yes
# Analyse import fallback blocks.
analyse-fallback-blocks=no
# Deprecated modules which should not be used.
deprecated-modules=optparse,tkinter.tix
# Create dependencies graph in the given files (report RP0402 must be enabled).
ext-import-graph= # Create a graph of external dependencies.
int-import-graph= # Create a graph of internal dependencies.
import-graph= # Create a graph of every (internal & external) dependencies.
# Force import order to recognize a module as part of the standard compat libs.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=
# }}}
# Classes {{{
[CLASSES]
# List of method names used to declare instance attributes.
defining-attr-methods=__init__,__new__,setUp
# Member names that should should be excluded from the protected access warning.
exclude-protected=_asdict,_fields,_replace,_source,_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# }}}
# Design {{{
[DESIGN]
max-args=9 # Max number of arguments for function/method.
max-attributes=7 # Max number of attributes for a class (see R0902).
max-bool-expr=3 # Max number of boolean expressions in a if statement.
max-branches=12 # Max number of branch for function/method body.
max-locals=15 # Max number of locals for function/method body.
max-parents=7 # Max number of parents for a class (see R0901).
max-public-methods=20 # Max number of public methods for a class (see R0904).
max-returns=6 # Max number of return/yield for function/method body.
max-statements=50 # Max number of statements in function/method body.
min-public-methods=2 # Min number of public methods for a class (see R0903).
# }}}
# Logging {{{
[LOGGING]
# List of logging modules.
# To check that string format args are in logging function parameter format.
logging-modules=logging
# }}}
# Exceptions {{{
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught.
overgeneral-exceptions=Exception
# }}}
# Misc. {{{
[MISCELLANEOUS]
# List of note tags to take in consideration.
notes=FIXME
# }}}