This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 253
/
pylintrc
431 lines (405 loc) · 11.4 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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# ***************************
# ** DO NOT EDIT THIS FILE **
# ***************************
#
# This file was generated by edx-lint: https://github.com/openedx/edx-lint
#
# If you want to change this file, you have two choices, depending on whether
# you want to make a local change that applies only to this repo, or whether
# you want to make a central change that applies to all repos using edx-lint.
#
# Note: If your pylintrc file is simply out-of-date relative to the latest
# pylintrc in edx-lint, ensure you have the latest edx-lint installed
# and then follow the steps for a "LOCAL CHANGE".
#
# LOCAL CHANGE:
#
# 1. Edit the local pylintrc_tweaks file to add changes just to this
# repo's file.
#
# 2. Run:
#
# $ edx_lint write pylintrc
#
# 3. This will modify the local file. Submit a pull request to get it
# checked in so that others will benefit.
#
#
# CENTRAL CHANGE:
#
# 1. Edit the pylintrc file in the edx-lint repo at
# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc
#
# 2. install the updated version of edx-lint (in edx-lint):
#
# $ pip install .
#
# 3. Run (in edx-lint):
#
# $ edx_lint write pylintrc
#
# 4. Make a new version of edx_lint, submit and review a pull request with the
# pylintrc update, and after merging, update the edx-lint version and
# publish the new version.
#
# 5. In your local repo, install the newer version of edx-lint.
#
# 6. Run:
#
# $ edx_lint write pylintrc
#
# 7. This will modify the local file. Submit a pull request to get it
# checked in so that others will benefit.
#
#
#
#
#
# STAY AWAY FROM THIS FILE!
#
#
#
#
#
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.3.6
# ------------------------------
[MASTER]
ignore =
persistent = yes
load-plugins = edx_lint.pylint,pylint_django,pylint_celery
[MESSAGES CONTROL]
enable =
blacklisted-name,
line-too-long,
abstract-class-instantiated,
abstract-method,
access-member-before-definition,
anomalous-backslash-in-string,
anomalous-unicode-escape-in-string,
arguments-differ,
assert-on-tuple,
assigning-non-slot,
assignment-from-no-return,
assignment-from-none,
attribute-defined-outside-init,
bad-except-order,
bad-format-character,
bad-format-string-key,
bad-format-string,
bad-open-mode,
bad-reversed-sequence,
bad-staticmethod-argument,
bad-str-strip-call,
bad-super-call,
binary-op-exception,
boolean-datetime,
catching-non-exception,
cell-var-from-loop,
confusing-with-statement,
continue-in-finally,
dangerous-default-value,
duplicate-argument-name,
duplicate-bases,
duplicate-except,
duplicate-key,
expression-not-assigned,
format-combined-specification,
format-needs-mapping,
function-redefined,
global-variable-undefined,
import-error,
import-self,
inconsistent-mro,
inherit-non-class,
init-is-generator,
invalid-all-object,
invalid-format-index,
invalid-length-returned,
invalid-sequence-index,
invalid-slice-index,
invalid-slots-object,
invalid-slots,
invalid-unary-operand-type,
logging-too-few-args,
logging-too-many-args,
logging-unsupported-format,
lost-exception,
method-hidden,
misplaced-bare-raise,
misplaced-future,
missing-format-argument-key,
missing-format-attribute,
missing-format-string-key,
no-member,
no-method-argument,
no-name-in-module,
no-self-argument,
no-value-for-parameter,
non-iterator-returned,
non-parent-method-called,
nonexistent-operator,
not-a-mapping,
not-an-iterable,
not-callable,
not-context-manager,
not-in-loop,
pointless-statement,
pointless-string-statement,
raising-bad-type,
raising-non-exception,
redefined-builtin,
redefined-outer-name,
redundant-keyword-arg,
repeated-keyword,
return-arg-in-generator,
return-in-init,
return-outside-function,
signature-differs,
super-init-not-called,
super-method-not-called,
syntax-error,
test-inherits-tests,
too-few-format-args,
too-many-format-args,
too-many-function-args,
translation-of-non-string,
truncated-format-string,
undefined-all-variable,
undefined-loop-variable,
undefined-variable,
unexpected-keyword-arg,
unexpected-special-method-signature,
unpacking-non-sequence,
unreachable,
unsubscriptable-object,
unsupported-binary-operation,
unsupported-membership-test,
unused-format-string-argument,
unused-format-string-key,
used-before-assignment,
using-constant-test,
yield-outside-function,
astroid-error,
fatal,
method-check-failed,
parse-error,
raw-checker-failed,
empty-docstring,
invalid-characters-in-docstring,
missing-docstring,
wrong-spelling-in-comment,
wrong-spelling-in-docstring,
unused-argument,
unused-import,
unused-variable,
eval-used,
exec-used,
bad-classmethod-argument,
bad-mcs-classmethod-argument,
bad-mcs-method-argument,
bare-except,
broad-except,
consider-iterating-dictionary,
consider-using-enumerate,
global-at-module-level,
global-variable-not-assigned,
literal-used-as-attribute,
logging-format-interpolation,
logging-not-lazy,
multiple-imports,
multiple-statements,
no-classmethod-decorator,
no-staticmethod-decorator,
protected-access,
redundant-unittest-assert,
reimported,
simplifiable-if-statement,
simplifiable-range,
singleton-comparison,
superfluous-parens,
unidiomatic-typecheck,
unnecessary-lambda,
unnecessary-pass,
unnecessary-semicolon,
unneeded-not,
useless-else-on-loop,
wrong-assert-type,
deprecated-method,
deprecated-module,
too-many-boolean-expressions,
too-many-nested-blocks,
too-many-statements,
wildcard-import,
wrong-import-order,
wrong-import-position,
missing-final-newline,
mixed-line-endings,
trailing-newlines,
trailing-whitespace,
unexpected-line-ending-format,
bad-inline-option,
bad-option-value,
deprecated-pragma,
unrecognized-inline-option,
useless-suppression,
disable =
bad-indentation,
broad-exception-raised,
consider-using-f-string,
duplicate-code,
file-ignored,
fixme,
global-statement,
invalid-name,
locally-disabled,
no-else-return,
suppressed-message,
too-few-public-methods,
too-many-ancestors,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-public-methods,
too-many-return-statements,
ungrouped-imports,
unspecified-encoding,
unused-wildcard-import,
use-maxsplit-arg,
feature-toggle-needs-doc,
illegal-waffle-usage,
logging-fstring-interpolation,
super-method-not-called, # E7601: Super method not called
useless-suppression, # I0021: Useless suppression of ...
line-too-long, # C0301: Line too long
wildcard-import, # W0401: Wildcard import
raise-missing-from, # W0707: Consider explicitly re-raising ...
use-dict-literal, # R1735: Consider using a dict literal ...
R1725, # Consider using Python 3 style super() without arguments
W1406, # Implicit string concatenation found in parentheses
C0114, # Missing module docstring
C0115, # Missing class docstring
C0116, # Missing function or method docstring
C0411, # Standard import should be placed before any third party or local imports
E1101, # Instance of 'Class' has no 'member' member
C7620, # range() call could be single-argument
C7690, # Wrong assert type
C0206, # Consider iterating with .items()
E7665, # Invalid Django Waffle import
E7610, # i18n function _() must be called with a literal string
E1131, # Unsupported operand type(s) for |
W3101, # Missing timeout argument for method 'requests.get'
R1728, # Consider using a generator
W1404, # Implicit string concatenation
C0325, # Unnecessary parens after '=' keyword
R1734, # Consider using [] instead of list() (use-list-literal)
R1729, # Use a generator instead 'all(...)' (use-a-generator)
W0134, # 'return' shadowed by the 'finally' clause. (return-in-finally)
R1710, # Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
C7630, # getattr using a literal attribute name (literal-used-as-attribute)
E7655, # Missing non-optional annotation: '.. toggle_implementation:' (annotation-missing-token)
W0237, # Parameter has been renamed in overriding method (arguments-renamed)
E0606, # Possibly using variable before assignment (possibly-used-before-assignment)
R1711, # Useless return at end of function or method (useless-return)
C0201, # Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
E7603, # Test class inherits tests from another test class (test-inherits-tests)
R1736, # Unnecessary list index lookup, use '_' instead (unnecessary-list-index-lookup)
W1310, # Using formatting for a string that does not have any interpolated variables (format-string-without-interpolation)
C2801, # Unnecessarily calls dunder method __str__. Use str built-in function. (unnecessary-dunder-call)
R0201, # Method could be a function
W0613, # Unused argument %r
W0611, # Unused import %s
E0013, # bad-plugin-value
E0213, # Method should have "self" as first argument
C0113, # Unneeded negation
W0612, # Unused variable %r
W0107 # Unnecessary pass statement
[REPORTS]
output-format = text
reports = no
score = no
[BASIC]
module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$
class-rgx = [A-Z_][a-zA-Z0-9]+$
function-rgx = ([a-z_][a-z0-9_]{2,40}|test_[a-z0-9_]+)$
method-rgx = ([a-z_][a-z0-9_]{2,40}|setUp|set[Uu]pClass|tearDown|tear[Dd]ownClass|assert[A-Z]\w*|maxDiff|test_[a-z0-9_]+)$
attr-rgx = [a-z_][a-z0-9_]{2,30}$
argument-rgx = [a-z_][a-z0-9_]{2,30}$
variable-rgx = [a-z_][a-z0-9_]{2,30}$
class-attribute-rgx = ([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
inlinevar-rgx = [A-Za-z_][A-Za-z0-9_]*$
good-names = f,i,j,k,db,ex,Run,_,__
bad-names = foo,bar,baz,toto,tutu,tata
no-docstring-rgx = __.*__$|test_.+|setUp$|setUpClass$|tearDown$|tearDownClass$|Meta$
docstring-min-length = 5
[FORMAT]
max-line-length = 120
ignore-long-lines = ^\s*(# )?((<?https?://\S+>?)|(\.\. \w+: .*))$
single-line-if-stmt = no
max-module-lines = 1000
indent-string = ' '
[MISCELLANEOUS]
notes = FIXME,XXX,TODO
[SIMILARITIES]
min-similarity-lines = 4
ignore-comments = yes
ignore-docstrings = yes
ignore-imports = yes
[TYPECHECK]
ignore-mixin-members = yes
ignored-classes = SQLObject
unsafe-load-any-extension = yes
generated-members =
REQUEST,
acl_users,
aq_parent,
objects,
DoesNotExist,
can_read,
can_write,
get_url,
size,
content,
status_code,
create,
build,
fields,
tag,
org,
course,
category,
name,
revision,
_meta,
[VARIABLES]
init-import = no
dummy-variables-rgx = _|dummy|unused|.*_unused
additional-builtins =
[CLASSES]
defining-attr-methods = __init__,__new__,setUp
valid-classmethod-first-arg = cls
valid-metaclass-classmethod-first-arg = mcs
[DESIGN]
max-args = 5
ignored-argument-names = _.*
max-locals = 15
max-returns = 6
max-branches = 12
max-statements = 50
max-parents = 7
max-attributes = 7
min-public-methods = 2
max-public-methods = 20
[IMPORTS]
deprecated-modules = regsub,TERMIOS,Bastion,rexec
import-graph =
ext-import-graph =
int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = builtins.Exception
# 5f343c05ade94b1f05eeb1763ca543bf867246f6