/
pylintrc
1840 lines (1685 loc) · 88.1 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
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### This is a detailed .pylintrc file compiled by David Taylor
### I took the default .pylintrc, added all errors (mostly commented out) explicitly,
### and changed some defaults
### My comments are preceded by three hashes; comments in the default file have one hash
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
# removed
# ignore=CVS
ignore=
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
# changed from yes to no
persistent=no
# Specify a configuration file.
#rcfile=
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
### Start with:
### Disabled by default but not deprecated in Python 3
disable=I0001,
# :raw-checker-failed: (Unable to run raw checkers on built-in module %s)
# Used to inform that a built-in module has not been checked using the raw checkers.
I0010,
# :bad-inline-option: (Unable to consider inline option %r)
# Used when an inline option is either badly formatted or can't be used inside modules.
I0011,
# :locally-disabled: (Locally disabling %s (%s))
# Used when an inline option disables a message or a messages category.
I0013,
# :file-ignored: (Ignoring entire file)
# Used to inform that the file will not be checked
I0020,
# :suppressed-message: (Suppressed %s (from line %d))
# A message was triggered on a line, but suppressed explicitly by a disable= comment in the
# file. This message is not generated for messages that are ignored due to configuration
# settings.
I0021,
# :useless-suppression: (Useless suppression of %s)
# Reported when a message is explicitly disabled for a line or a block of code, but never
# triggered.
I0022,
# :deprecated-pragma: (Pragma "%s" is deprecated, use "%s" instead)
# Some inline pylint options have been renamed or reworked, only the most recent form should
# be used. NOTE:skip-all is only available with pylint >= 0.26
I0023,
# :use-symbolic-message-instead: (None)
# Used when a message is enabled or disabled by id.
W1641,
# :eq-without-hash: (Implementing __eq__ without also implementing __hash__)
# Used when a class implements __eq__ but not __hash__. In Python 2, objects get
# object.__hash__ as the default implementation, in Python 3 objects get None as their
# default __hash__ implementation if they also implement __eq__.
W1642,
# :div-method: (__div__ method defined)
# Used when a __div__ method is defined. Using `__truediv__` and setting__div__ =
# __truediv__ should be preferred.(method is not used by Python 3)
W1643,
# :idiv-method: (__idiv__ method defined)
# Used when an __idiv__ method is defined. Using `__itruediv__` and setting__idiv__ =
# __itruediv__ should be preferred.(method is not used by Python 3)
W1644,
# :rdiv-method: (__rdiv__ method defined)
# Used when a __rdiv__ method is defined. Using `__rtruediv__` and setting__rdiv__ =
# __rtruediv__ should be preferred.(method is not used by Python 3)
W1645,
# :exception-message-attribute: (Exception.message removed in Python 3)
# Used when the message attribute is accessed on an Exception. Use str(exception) instead.
W1646,
# :invalid-str-codec: (non-text encoding used in str.decode)
# Used when using str.encode or str.decode with a non-text encoding. Use codecs module to
# handle arbitrary codecs.
W1647,
# :sys-max-int: (sys.maxint removed in Python 3)
# Used when accessing sys.maxint. Use sys.maxsize instead.
W1648,
# :bad-python3-import: (Module moved in Python 3)
# Used when importing a module that no longer exists in Python 3.
W1649,
# :deprecated-string-function: (Accessing a deprecated function on the string module)
# Used when accessing a string function that has been deprecated in Python 3.
W1650,
# :deprecated-str-translate-call: (Using str.translate with deprecated deletechars parameters)
# Used when using the deprecated deletechars parameters from str.translate. Use re.sub to
# remove the desired characters
W1651,
# :deprecated-itertools-function: (Accessing a deprecated function on the itertools module)
# Used when accessing a function on itertools that has been removed in Python 3.
W1652,
# :deprecated-types-field: (Accessing a deprecated fields on the types module)
# Used when accessing a field on types that has been removed in Python 3.
W1653,
# :next-method-defined: (next method defined)
# Used when a next method is defined that would be an iterator in Python 2 but is treated as
# a normal function in Python 3.
W1654,
# :dict-items-not-iterating: (dict.items referenced when not iterating)
# Used when dict.items is referenced in a non-iterating context (returns an iterator in
# Python 3)
W1655,
# :dict-keys-not-iterating: (dict.keys referenced when not iterating)
# Used when dict.keys is referenced in a non-iterating context (returns an iterator in
# Python 3)
W1656,
# :dict-values-not-iterating: (dict.values referenced when not iterating)
# Used when dict.values is referenced in a non-iterating context (returns an iterator in
# Python 3)
W1657,
# :deprecated-operator-function: (Accessing a removed attribute on the operator module)
# Used when accessing a field on operator module that has been removed in Python 3.
W1658,
# :deprecated-urllib-function: (Accessing a removed attribute on the urllib module)
# Used when accessing a field on urllib module that has been removed or moved in Python 3.
W1659,
# :xreadlines-attribute: (Accessing a removed xreadlines attribute)
# Used when accessing the xreadlines() function on a file stream, removed in Python 3.
W1660,
# :deprecated-sys-function: (Accessing a removed attribute on the sys module)
# Used when accessing a field on sys module that has been removed in Python 3.
W1661,
# :exception-escape: (Using an exception object that was bound by an except handler)
# Emitted when using an exception, that was bound in an except handler, outside of the
# except handler. On Python 3 these exceptions will be deleted once they get out of the
# except handler.
W1662,
# :comprehension-escape: (Using a variable that was bound inside a comprehension)
# Emitted when using a variable, that was bound in a comprehension handler, outside of the
# comprehension itself. On Python 3 these variables will be deleted outside of the
# comprehension.
### Disabled by default AND deprecated in Python 3
### There are no codes that are deprecated in Python 3 and NOT disabled by default
E1601,
# :print-statement: (print statement used)
# Used when a print statement is used (`print` is a function in Python 3)
E1602,
# :parameter-unpacking: (Parameter unpacking specified)
# Used when parameter unpacking is specified for a function(Python 3 doesn't allow it)
E1603,
# :unpacking-in-except: (Implicit unpacking of exceptions is not supported in Python 3)
# Python3 will not allow implicit unpacking of exceptions in except clauses. See
# http://www.python.org/dev/peps/pep-3110/
E1604,
# :old-raise-syntax: (Use raise ErrorClass(args) instead of raise ErrorClass, args.)
# Used when the alternate raise syntax 'raise foo, bar' is used instead of 'raise foo(bar)'.
E1605,
# :backtick: (Use of the `` operator)
# Used when the deprecated "``" (backtick) operator is used instead of the str() function.
W1601,
# :apply-builtin: (apply built-in referenced)
# Used when the apply built-in function is referenced (missing from Python 3)
W1602,
# :basestring-builtin: (basestring built-in referenced)
# Used when the basestring built-in function is referenced (missing from Python 3)
W1603,
# :buffer-builtin: (buffer built-in referenced)
# Used when the buffer built-in function is referenced (missing from Python 3)
W1604,
# :cmp-builtin: (cmp built-in referenced)
# Used when the cmp built-in function is referenced (missing from Python 3)
W1605,
# :coerce-builtin: (coerce built-in referenced)
# Used when the coerce built-in function is referenced (missing from Python 3)
W1606,
# :execfile-builtin: (execfile built-in referenced)
# Used when the execfile built-in function is referenced (missing from Python 3)
W1607,
# :file-builtin: (file built-in referenced)
# Used when the file built-in function is referenced (missing from Python 3)
W1608,
# :long-builtin: (long built-in referenced)
# Used when the long built-in function is referenced (missing from Python 3)
W1609,
# :raw_input-builtin: (raw_input built-in referenced)
# Used when the raw_input built-in function is referenced (missing from Python 3)
W1610,
# :reduce-builtin: (reduce built-in referenced)
# Used when the reduce built-in function is referenced (missing from Python 3)
W1611,
# :standarderror-builtin: (StandardError built-in referenced)
# Used when the StandardError built-in function is referenced (missing from Python 3)
W1612,
# :unicode-builtin: (unicode built-in referenced)
# Used when the unicode built-in function is referenced (missing from Python 3)
W1613,
# :xrange-builtin: (xrange built-in referenced)
# Used when the xrange built-in function is referenced (missing from Python 3)
W1614,
# :coerce-method: (__coerce__ method defined)
# Used when a __coerce__ method is defined (method is not used by Python 3)
W1615,
# :delslice-method: (__delslice__ method defined)
# Used when a __delslice__ method is defined (method is not used by Python 3)
W1616,
# :getslice-method: (__getslice__ method defined)
# Used when a __getslice__ method is defined (method is not used by Python 3)
W1617,
# :setslice-method: (__setslice__ method defined)
# Used when a __setslice__ method is defined (method is not used by Python 3)
W1618,
# :no-absolute-import: (import missing `from __future__ import absolute_import`)
# Used when an import is not accompanied by ``from __future__ import absolute_import``
# (default behaviour in Python 3)
W1619,
# :old-division: (division w/o __future__ statement)
# Used for non-floor division w/o a float literal or ``from __future__ import division``
# (Python 3 returns a float for int division unconditionally)
W1620,
# :dict-iter-method: (Calling a dict.iter*() method)
# Used for calls to dict.iterkeys(), itervalues() or iteritems() (Python 3 lacks these
# methods)
W1621,
# :dict-view-method: (Calling a dict.view*() method)
# Used for calls to dict.viewkeys(), viewvalues() or viewitems() (Python 3 lacks these
# methods)
W1622,
# :next-method-called: (Called a next() method on an object)
# Used when an object's next() method is called (Python 3 uses the next() built- in
# function)
W1623,
# :metaclass-assignment: (Assigning to a class's __metaclass__ attribute)
# Used when a metaclass is specified by assigning to __metaclass__ (Python 3 specifies the
# metaclass as a class statement argument)
W1624,
# :indexing-exception: (Indexing exceptions will not work on Python 3)
# Indexing exceptions will not work on Python 3. Use `exception.args[index]` instead.
W1625,
# :raising-string: (Raising a string exception)
# Used when a string exception is raised. This will not work on Python 3.
W1626,
# :reload-builtin: (reload built-in referenced)
# Used when the reload built-in function is referenced (missing from Python 3). You can use
# instead imp.reload or importlib.reload.
W1627,
# :oct-method: (__oct__ method defined)
# Used when an __oct__ method is defined (method is not used by Python 3)
W1628,
# :hex-method: (__hex__ method defined)
# Used when a __hex__ method is defined (method is not used by Python 3)
W1629,
# :nonzero-method: (__nonzero__ method defined)
# Used when a __nonzero__ method is defined (method is not used by Python 3)
W1630,
# :cmp-method: (__cmp__ method defined)
# Used when a __cmp__ method is defined (method is not used by Python 3)
W1632,
# :input-builtin: (input built-in referenced)
# Used when the input built-in is referenced (backwards-incompatible semantics in Python 3)
W1633,
# :round-builtin: (round built-in referenced)
# Used when the round built-in is referenced (backwards-incompatible semantics in Python 3)
W1634,
# :intern-builtin: (intern built-in referenced)
# Used when the intern built-in is referenced (Moved to sys.intern in Python 3)
W1635,
# :unichr-builtin: (unichr built-in referenced)
# Used when the unichr built-in is referenced (Use chr in Python 3)
W1636,
# :map-builtin-not-iterating: (map built-in referenced when not iterating)
# Used when the map built-in is referenced in a non-iterating context (returns an iterator
# in Python 3)
W1637,
# :zip-builtin-not-iterating: (zip built-in referenced when not iterating)
# Used when the zip built-in is referenced in a non-iterating context (returns an iterator
# in Python 3)
W1638,
# :range-builtin-not-iterating: (range built-in referenced when not iterating)
# Used when the range built-in is referenced in a non-iterating context (returns a range in
# Python 3)
W1639,
# :filter-builtin-not-iterating: (filter built-in referenced when not iterating)
# Used when the filter built-in is referenced in a non-iterating context (returns an
# iterator in Python 3)
W1640,
# :using-cmp-argument: (Using the cmp argument for list.sort / sorted)
# Using the cmp argument for list.sort or the sorted builtin should be avoided, since it was
# removed in Python 3. Using either `key` or `functools.cmp_to_key` should be preferred.
E1606,
# :long-suffix: (Use of long suffix)
# Used when "l" or "L" is used to mark a long integer. This will not work in Python 3, since
# int and long types have merged. This message can’t be emitted when using Python >= 3.0.
E1607,
# :old-ne-operator: (Use of the <> operator)
# Used when the deprecated \<>" operator is used instead of "!=". This is removed in Python
# 3. This message can’t be emitted when using Python >= 3.0.
E1608,
# :old-octal-literal: (Use of old octal literal)
# Used when encountering the old octal syntax, removed in Python 3. To use the new syntax,
# prepend 0o on the number. This message can’t be emitted when using Python >= 3.0.
E1609,
# :import-star-module-level: (Import * only allowed at module level)
# Used when the import star syntax is used somewhere else than the module level. This
# message can’t be emitted when using Python >= 3.0.
E1610,
# :non-ascii-bytes-literal: (Non-ascii bytes literals not supported in 3.x)
# Used when non-ascii bytes literals are found in a program. They are no longer supported in
# Python 3.
W0331,
# :old-old-ne-operator: (Use of old old ne operator)
# Deprecated and replaced by E1607
### Neither disabled by default nor enabled by default; to be selected manually
# C0102,
# :blacklisted-name: (Black listed name "%s")
# Used when the name is listed in the black list (unauthorized names).
# C0103,
# :invalid-name: (%s name "%s" doesn't conform to %s)
# Used when the name doesn't conform to naming rules associated to its type (constant,
# variable, class...).
# C0112,
# :empty-docstring: (Empty %s docstring)
# Used when a module, function, class or method has an empty docstring (it would be too easy
# ;).
# C0113,
# :unneeded-not: (Consider changing "%s" to "%s")
# Used when a boolean expression contains an unneeded negation.
# C0114,
# :missing-module-docstring: (Missing module docstring)
# Used when a module has no docstring. Empty modules do not require a docstring.
# C0115,
# :missing-class-docstring: (Missing class docstring)
# Used when a class has no docstring. Even an empty class must have a docstring.
# C0116,
# :missing-function-docstring: (Missing function or method docstring)
# Used when a function or method has no docstring. Some special methods like __init__ do not
# require a docstring.
# C0121,
# :singleton-comparison: (Comparison to %s should be %s)
# Used when an expression is compared to singleton values like True, False or None.
# C0122,
# :misplaced-comparison-constant: (Comparison should be %s)
# Used when the constant is placed on the left side of a comparison. It is usually clearer
# in intent to place it in the right hand side of the comparison.
# C0123,
# :unidiomatic-typecheck: (Using type() instead of isinstance() for a typecheck.)
# The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y)
# rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these
# give different results.
# C0200,
# :consider-using-enumerate: (Consider using enumerate instead of iterating with range and len)
# Emitted when code that iterates with range and len is encountered. Such code can be
# simplified by using the enumerate builtin.
# C0201,
# :consider-iterating-dictionary: (Consider iterating the dictionary directly instead of calling .keys())
# Emitted when the keys of a dictionary are iterated through the .keys() method. It is
# enough to just iterate through the dictionary itself, as in "for key in dictionary".
# C0202,
# :bad-classmethod-argument: (Class method %s should have %s as first argument)
# Used when a class method has a first argument named differently than the value specified
# in valid-classmethod-first-arg option (default to "cls"), recommended to easily
# differentiate them from regular instance methods.
# C0203,
# :bad-mcs-method-argument: (Metaclass method %s should have %s as first argument)
# Used when a metaclass method has a first argument named differently than the value
# specified in valid-classmethod-first-arg option (default to "cls"), recommended to
# easily differentiate them from regular instance methods.
# C0204,
# :bad-mcs-classmethod-argument: (Metaclass class method %s should have %s as first argument)
# Used when a metaclass class method has a first argument named differently than the value
# specified in valid-metaclass-classmethod-first-arg option (default to "mcs"),
# recommended to easily differentiate them from regular instance methods.
# C0205,
# :single-string-used-for-slots: (Class __slots__ should be a non-string iterable)
# Used when a class __slots__ is a simple string, rather than an iterable.
# C0301,
# :line-too-long: (Line too long (%s/%s))
# Used when a line is longer than a given number of characters.
# C0302,
# :too-many-lines: (Too many lines in module (%s/%s))
# Used when a module has too many lines, reducing its readability.
### I have explicitly disabled C0303, C0304 and C0305
C0303,
# :trailing-whitespace: (Trailing whitespace)
# Used when there is whitespace between the end of a line and the newline.
C0304,
# :missing-final-newline: (Final newline missing)
# Used when the last line in a file is missing a newline.
C0305,
# :trailing-newlines: (Trailing newlines)
# Used when there are trailing blank lines in a file.
# C0321,
# :multiple-statements: (More than one statement on a single line)
# Used when more than on statement are found on the same line.
# C0325,
# :superfluous-parens: (Unnecessary parens after %r keyword)
# Used when a single item in parentheses follows an if, for, or other keyword.
# C0326,
# :bad-whitespace: (%s space %s %s %s)
# Used when a wrong number of spaces is used around an operator, bracket or block opener.
# C0327,
# :mixed-line-endings: (Mixed line endings LF and CRLF)
# Used when there are mixed (LF and CRLF) newline signs in a file.
# C0328,
# :unexpected-line-ending-format: (Unexpected line ending format. There is '%s' while it should be '%s'.)
# Used when there is different newline than expected.
# C0330,
# :bad-continuation: (Wrong %s indentation%s%s.)
# TODO
# C0401,
# :wrong-spelling-in-comment: (Wrong spelling of a word '%s' in a comment:)
# Used when a word in comment is not spelled correctly.
# C0402,
# :wrong-spelling-in-docstring: (Wrong spelling of a word '%s' in a docstring:)
# Used when a word in docstring is not spelled correctly.
# C0403,
# :invalid-characters-in-docstring: (Invalid characters %r in a docstring)
# Used when a word in docstring cannot be checked by enchant.
# C0410,
# :multiple-imports: (Multiple imports on one line (%s))
# Used when import statement importing multiple modules is detected.
# C0411,
# :wrong-import-order: (%s should be placed before %s)
# Used when PEP8 import order is not respected (standard imports first, then third-party
# libraries, then local imports)
# C0412,
# :ungrouped-imports: (Imports from package %s are not grouped)
# Used when imports are not grouped by packages
# C0413,
# :wrong-import-position: (Import "%s" should be placed at the top of the module)
# Used when code and imports are mixed
# C0414,
# :useless-import-alias: (Import alias does not rename original package)
# Used when an import alias is same as original package, e.g. using import numpy as numpy
# instead of import numpy as np
# C0415,
# :import-outside-toplevel: (Import outside toplevel (%s))
# Used when an import statement is used anywhere other than the module toplevel. Move this
# import to the top of the file.
# C1801,
# :len-as-condition: (Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty)
# Used when Pylint detects that len(sequence) is being used without explicit comparison
# inside a condition to determine if a sequence is empty. Instead of coercing the length
# to a boolean, either rely on the fact that empty sequences are false or compare the
# length against a scalar.
# E0001,
# :syntax-error: (None)
# Used when a syntax error is raised for a module.
# E0011,
# :unrecognized-inline-option: (Unrecognized file option %r)
# Used when an unknown inline option is encountered.
# E0012,
# :bad-option-value: (Bad option value %r)
# Used when a bad value for an inline option is encountered.
# E0100,
# :init-is-generator: (__init__ method is a generator)
# Used when the special class method __init__ is turned into a generator by a yield in its
# body.
# E0101,
# :return-in-init: (Explicit return in __init__)
# Used when the special class method __init__ has an explicit return value.
# E0102,
# :function-redefined: (%s already defined line %s)
# Used when a function / class / method is redefined.
# E0103,
# :not-in-loop: (%r not properly in loop)
# Used when break or continue keywords are used outside a loop.
# E0104,
# :return-outside-function: (Return outside function)
# Used when a "return" statement is found outside a function or method.
# E0105,
# :yield-outside-function: (Yield outside function)
# Used when a "yield" statement is found outside a function or method.
# E0107,
# :nonexistent-operator: (Use of the non-existent %s operator)
# Used when you attempt to use the C-style pre-increment or pre-decrement operator -- and
# ++, which doesn't exist in Python.
# E0108,
# :duplicate-argument-name: (Duplicate argument name %s in function definition)
# Duplicate argument names in function definitions are syntax errors.
# E0110,
# :abstract-class-instantiated: (Abstract class %r with abstract methods instantiated)
# Used when an abstract class with `abc.ABCMeta` as metaclass has abstract methods and is
# instantiated.
# E0111,
# :bad-reversed-sequence: (The first reversed() argument is not a sequence)
# Used when the first argument to reversed() builtin isn't a sequence (does not implement
# __reversed__, nor __getitem__ and __len__
# E0112,
# :too-many-star-expressions: (More than one starred expression in assignment)
# Emitted when there are more than one starred expressions (`*x`) in an assignment. This is
# a SyntaxError.
# E0113,
# :invalid-star-assignment-target: (Starred assignment target must be in a list or tuple)
# Emitted when a star expression is used as a starred assignment target.
# E0114,
# :star-needs-assignment-target: (Can use starred expression only in assignment target)
# Emitted when a star expression is not used in an assignment target.
# E0115,
# :nonlocal-and-global: (Name %r is nonlocal and global)
# Emitted when a name is both nonlocal and global.
# E0116,
# :continue-in-finally: ('continue' not supported inside 'finally' clause)
# Emitted when the `continue` keyword is found inside a finally clause, which is a
# SyntaxError.
# E0117,
# :nonlocal-without-binding: (nonlocal name %s found without binding)
# Emitted when a nonlocal variable does not have an attached name somewhere in the parent
# scopes
# E0118,
# :used-prior-global-declaration: (Name %r is used prior to global declaration)
# Emitted when a name is used prior a global declaration, which results in an error since
# Python 3.6. This message can't be emitted when using Python < 3.6.
# E0119,
# :misplaced-format-function: (format function is not called on str)
# Emitted when format function is not called on str object. e.g doing print("value:
# {}").format(123) instead of print("value: {}".format(123)). This might not be what the
# user intended to do.
# E0202,
# :method-hidden: (An attribute defined in %s line %s hides this method)
# Used when a class defines a method which is hidden by an instance attribute from an
# ancestor class or set by some client code.
# E0203,
# :access-member-before-definition: (Access to member %r before its definition line %s)
# Used when an instance member is accessed before it's actually assigned.
# E0211,
# :no-method-argument: (Method has no argument)
# Used when a method which should have the bound instance as first argument has no argument
# defined.
# E0213,
# :no-self-argument: (Method should have "self" as first argument)
# Used when a method has an attribute different the "self" as first argument. This is
# considered as an error since this is a so common convention that you shouldn't break it!
# E0236,
# :invalid-slots-object: (Invalid object %r in __slots__, must contain only non empty strings)
# Used when an invalid (non-string) object occurs in __slots__.
# E0237,
# :assigning-non-slot: (Assigning to attribute %r not defined in class slots)
# Used when assigning to an attribute not defined in the class slots.
# E0238,
# :invalid-slots: (Invalid __slots__ object)
# Used when an invalid __slots__ is found in class. Only a string, an iterable or a sequence
# is permitted.
# E0239,
# :inherit-non-class: (Inheriting %r, which is not a class.)
# Used when a class inherits from something which is not a class.
# E0240,
# :inconsistent-mro: (Inconsistent method resolution order for class %r)
# Used when a class has an inconsistent method resolution order.
# E0241,
# :duplicate-bases: (Duplicate bases for class %r)
# Used when a class has duplicate bases.
# E0242,
# :class-variable-slots-conflict: (Value %r in slots conflicts with class variable)
# Used when a value in __slots__ conflicts with a class variable, property or method.
# E0301,
# :non-iterator-returned: (__iter__ returns non-iterator)
# Used when an __iter__ method returns something which is not an iterable (i.e. has no
# `__next__` method)
# E0302,
# :unexpected-special-method-signature: (The special method %r expects %s param(s), %d %s given)
# Emitted when a special method was defined with an invalid number of parameters. If it has
# too few or too many, it might not work at all.
# E0303,
# :invalid-length-returned: (__len__ does not return non-negative integer)
# Used when a __len__ method returns something which is not a non-negative integer
# E0401,
# :import-error: (Unable to import %s)
# Used when pylint has been unable to import a module.
# E0402,
# :relative-beyond-top-level: (Attempted relative import beyond top-level package)
# Used when a relative import tries to access too many levels in the current package.
# E0601,
# :used-before-assignment: (Using variable %r before assignment)
# Used when a local variable is accessed before its assignment.
# E0602,
# :undefined-variable: (Undefined variable %r)
# Used when an undefined variable is accessed.
# E0603,
# :undefined-all-variable: (Undefined variable name %r in __all__)
# Used when an undefined variable name is referenced in __all__.
# E0604,
# :invalid-all-object: (Invalid object %r in __all__, must contain only strings)
# Used when an invalid (non-string) object occurs in __all__.
# E0611,
# :no-name-in-module: (No name %r in module %r)
# Used when a name cannot be found in a module.
# E0633,
# :unpacking-non-sequence: (Attempting to unpack a non-sequence%s)
# Used when something which is not a sequence is used in an unpack assignment
# E0701,
# :bad-except-order: (Bad except clauses order (%s))
# Used when except clauses are not in the correct order (from the more specific to the more
# generic). If you don't fix the order, some exceptions may not be caught by the most
# specific handler.
# E0702,
# :raising-bad-type: (Raising %s while only classes or instances are allowed)
# Used when something which is neither a class, an instance or a string is raised (i.e. a
# `TypeError` will be raised).
# E0703,
# :bad-exception-context: (Exception context set to something which is not an exception, nor None)
# Used when using the syntax "raise ... from ...", where the exception context is not an
# exception, nor None.
# E0704,
# :misplaced-bare-raise: (The raise statement is not inside an except clause)
# Used when a bare raise is not used inside an except clause. This generates an error, since
# there are no active exceptions to be reraised. An exception to this rule is represented
# by a bare raise inside a finally clause, which might work, as long as an exception is
# raised inside the try block, but it is nevertheless a code smell that must not be relied
# upon.
# E0710,
# :raising-non-exception: (Raising a new style class which doesn't inherit from BaseException)
# Used when a new style class which doesn't inherit from BaseException is raised.
# E0711,
# :notimplemented-raised: (NotImplemented raised - should raise NotImplementedError)
# Used when NotImplemented is raised instead of NotImplementedError
# E0712,
# :catching-non-exception: (Catching an exception which doesn't inherit from Exception: %s)
# Used when a class which doesn't inherit from Exception is used as an exception in an
# except clause.
# E1003,
# :bad-super-call: (Bad first argument %r given to super())
# Used when another argument than the current class is given as first argument of the super
# builtin.
# E1101,
# :no-member: (%s %r has no %r member%s)
# Used when a variable is accessed for an unexistent member.
# E1102,
# :not-callable: (%s is not callable)
# Used when an object being called has been inferred to a non callable object.
# E1111,
# :assignment-from-no-return: (Assigning result of a function call, where the function has no return)
# Used when an assignment is done on a function call but the inferred function doesn't
# return anything.
# E1120,
# :no-value-for-parameter: (No value for argument %s in %s call)
# Used when a function call passes too few arguments.
# E1121,
# :too-many-function-args: (Too many positional arguments for %s call)
# Used when a function call passes too many positional arguments.
# E1123,
# :unexpected-keyword-arg: (Unexpected keyword argument %r in %s call)
# Used when a function call passes a keyword argument that doesn't correspond to one of the
# function's parameter names.
# E1124,
# :redundant-keyword-arg: (Argument %r passed by position and keyword in %s call)
# Used when a function call would result in assigning multiple values to a function
# parameter, one value from a positional argument and one from a keyword argument.
# E1125,
# :missing-kwoa: (Missing mandatory keyword argument %r in %s call)
# Used when a function call does not pass a mandatory keyword-only argument.
# E1126,
# :invalid-sequence-index: (Sequence index is not an int, slice, or instance with __index__)
# Used when a sequence type is indexed with an invalid type. Valid types are ints, slices,
# and objects with an __index__ method.
# E1127,
# :invalid-slice-index: (Slice index is not an int, None, or instance with __index__)
# Used when a slice index is not an integer, None, or an object with an __index__ method.
# E1128,
# :assignment-from-none: (Assigning result of a function call, where the function returns None)
# Used when an assignment is done on a function call but the inferred function returns
# nothing but None.
# E1129,
# :not-context-manager: (Context manager '%s' doesn't implement __enter__ and __exit__.)
# Used when an instance in a with statement doesn't implement the context manager
# protocol(__enter__/__exit__).
# E1130,
# :invalid-unary-operand-type: (None)
# Emitted when a unary operand is used on an object which does not support this type of
# operation.
# E1131,
# :unsupported-binary-operation: (None)
# Emitted when a binary arithmetic operation between two operands is not supported.
# E1132,
# :repeated-keyword: (Got multiple values for keyword argument %r in function call)
# Emitted when a function call got multiple values for a keyword.
# E1133,
# :not-an-iterable: (Non-iterable value %s is used in an iterating context)
# Used when a non-iterable value is used in place where iterable is expected
# E1134,
# :not-a-mapping: (Non-mapping value %s is used in a mapping context)
# Used when a non-mapping value is used in place where mapping is expected
# E1135,
# :unsupported-membership-test: (Value '%s' doesn't support membership test)
# Emitted when an instance in membership test expression doesn't implement membership
# protocol (__contains__/__iter__/__getitem__).
# E1136,
# :unsubscriptable-object: (Value '%s' is unsubscriptable)
# Emitted when a subscripted value doesn't support subscription (i.e. doesn't define
# __getitem__ method or __class_getitem__ for a class).
# E1137,
# :unsupported-assignment-operation: (%r does not support item assignment)
# Emitted when an object does not support item assignment (i.e. doesn't define __setitem__
# method).
# E1138,
# :unsupported-delete-operation: (%r does not support item deletion)
# Emitted when an object does not support item deletion (i.e. doesn't define __delitem__
# method).
# E1139,
# :invalid-metaclass: (Invalid metaclass %r used)
# Emitted whenever we can detect that a class is using, as a metaclass, something which
# might be invalid for using as a metaclass.
# E1140,
# :unhashable-dict-key: (Dict key is unhashable)
# Emitted when a dict key is not hashable (i.e. doesn't define __hash__ method).
# E1141,
# :dict-iter-missing-items: (Unpacking a dictionary in iteration without calling .items())
# Emitted when trying to iterate through a dict without calling .items()
# E1200,
# :logging-unsupported-format: (Unsupported logging format character %r (%#02x) at index %d)
# Used when an unsupported format character is used in a logging statement format string.
# E1201,
# :logging-format-truncated: (Logging format string ends in middle of conversion specifier)
# Used when a logging statement format string terminates before the end of a conversion
# specifier.
# E1205,
# :logging-too-many-args: (Too many arguments for logging format string)
# Used when a logging format string is given too many arguments.
# E1206,
# :logging-too-few-args: (Not enough arguments for logging format string)
# Used when a logging format string is given too few arguments.
# E1300,
# :bad-format-character: (Unsupported format character %r (%#02x) at index %d)
# Used when an unsupported format character is used in a format string.
# E1301,
# :truncated-format-string: (Format string ends in middle of conversion specifier)
# Used when a format string terminates before the end of a conversion specifier.
# E1302,
# :mixed-format-string: (Mixing named and unnamed conversion specifiers in format string)
# Used when a format string contains both named (e.g. '%(foo)d') and unnamed (e.g. '%d')
# conversion specifiers. This is also used when a named conversion specifier contains *
# for the minimum field width and/or precision.
# E1303,
# :format-needs-mapping: (Expected mapping for format string, not %s)
# Used when a format string that uses named conversion specifiers is used with an argument
# that is not a mapping.
# E1304,
# :missing-format-string-key: (Missing key %r in format string dictionary)
# Used when a format string that uses named conversion specifiers is used with a dictionary
# that doesn't contain all the keys required by the format string.
# E1305,
# :too-many-format-args: (Too many arguments for format string)
# Used when a format string that uses unnamed conversion specifiers is given too many
# arguments.
# E1306,
# :too-few-format-args: (Not enough arguments for format string)
# Used when a format string that uses unnamed conversion specifiers is given too few
# arguments
# E1307,
# :bad-string-format-type: (Argument %r does not match format type %r)
# Used when a type required by format string is not suitable for actual argument type
# E1310,
# :bad-str-strip-call: (Suspicious argument in %s.%s call)
# The argument to a str.{l,r,}strip call contains a duplicate character,
# E1507,
# :invalid-envvar-value: (%s does not support %s type argument)
# Env manipulation functions support only string type arguments. See
# https://docs.python.org/3/library/os.html#os.getenv.
# E1700,
# :yield-inside-async-function: (Yield inside async function)
# Used when an `yield` or `yield from` statement is found inside an async function. This
# message can't be emitted when using Python < 3.5.
# E1701,
# :not-async-context-manager: (Async context manager '%s' doesn't implement __aenter__ and __aexit__.)
# Used when an async context manager is used with an object that does not implement the
# async context management protocol. This message can't be emitted when using Python <
# 3.5.
# F0001,
# :fatal: (None)
# Used when an error occurred preventing the analysis of a module (unable to find it for
# instance).
# F0002,
# :astroid-error: (%s: %s)
# Used when an unexpected error occurred while building the Astroid representation. This is
# usually accompanied by a traceback. Please report such errors !
# F0010,
# :parse-error: (error while code parsing: %s)
# Used when an exception occurred while building the Astroid representation which could be
# handled by astroid.
# F0202,
# :method-check-failed: (Unable to check methods signature (%s / %s))
# Used when Pylint has been unable to check methods signature compatibility for an
# unexpected reason. Please report this kind if you don't make sense of it.
# R0123,
# :literal-comparison: (Comparison to literal)
# Used when comparing an object to a literal, which is usually what you do not want to do,
# since you can compare to a different literal than what was expected altogether.
# R0124,
# :comparison-with-itself: (Redundant comparison - %s)
# Used when something is compared against itself.
# R0201,
# :no-self-use: (Method could be a function)
# Used when a method doesn't use its bound instance, and so could be written as a function.
# R0202,
# :no-classmethod-decorator: (Consider using a decorator instead of calling classmethod)
# Used when a class method is defined without using the decorator syntax.
# R0203,
# :no-staticmethod-decorator: (Consider using a decorator instead of calling staticmethod)
# Used when a static method is defined without using the decorator syntax.
# R0205,
# :useless-object-inheritance: (Class %r inherits from object, can be safely removed from bases in python3)
# Used when a class inherit from object, which under python3 is implicit, hence can be
# safely removed from bases.
# R0206,
# :property-with-parameters: (Cannot have defined parameters for properties)
# Used when we detect that a property also has parameters, which are useless, given that
# properties cannot be called with additional arguments.
# R0401,
# :cyclic-import: (Cyclic import (%s))
# Used when a cyclic import between two or more modules is detected.
# R0801,
# :duplicate-code: (Similar lines in %s files)
# Indicates that a set of similar lines has been detected among multiple file. This usually
# means that the code should be refactored to avoid this duplication.
# R0901,
# :too-many-ancestors: (Too many ancestors (%s/%s))
# Used when class has too many parent classes, try to reduce this to get a simpler (and so
# easier to use) class.
# R0902,
# :too-many-instance-attributes: (Too many instance attributes (%s/%s))
# Used when class has too many instance attributes, try to reduce this to get a simpler (and
# so easier to use) class.
# R0903,
# :too-few-public-methods: (Too few public methods (%s/%s))
# Used when class has too few public methods, so be sure it's really worth it.
# R0904,
# :too-many-public-methods: (Too many public methods (%s/%s))
# Used when class has too many public methods, try to reduce this to get a simpler (and so
# easier to use) class.
# R0911,
# :too-many-return-statements: (Too many return statements (%s/%s))
# Used when a function or method has too many return statement, making it hard to follow.
# R0912,
# :too-many-branches: (Too many branches (%s/%s))
# Used when a function or method has too many branches, making it hard to follow.
# R0913,
# :too-many-arguments: (Too many arguments (%s/%s))
# Used when a function or method takes too many arguments.
# R0914,
# :too-many-locals: (Too many local variables (%s/%s))
# Used when a function or method has too many local variables.
# R0915,
# :too-many-statements: (Too many statements (%s/%s))
# Used when a function or method has too many statements. You should then split it in
# smaller functions / methods.
# R0916,
# :too-many-boolean-expressions: (Too many boolean expressions in if statement (%s/%s))
# Used when an if statement contains too many boolean expressions.
# R1701,
# :consider-merging-isinstance: (Consider merging these isinstance calls to isinstance(%s, (%s)))
# Used when multiple consecutive isinstance calls can be merged into one.
# R1702,
# :too-many-nested-blocks: (Too many nested blocks (%s/%s))
# Used when a function or a method has too many nested blocks. This makes the code less
# understandable and maintainable.
# R1703,
# :simplifiable-if-statement: (The if statement can be replaced with %s)
# Used when an if statement can be replaced with 'bool(test)'.
# R1704,
# :redefined-argument-from-local: (Redefining argument with the local name %r)
# Used when a local name is redefining an argument, which might suggest a potential error.
# This is taken in account only for a handful of name binding operations, such as for
# iteration, with statement assignment and exception handler assignment.
### Explicitly disabling R1705
R1705,
# :no-else-return: (Unnecessary "%s" after "return")
# Used in order to highlight an unnecessary block of code following an if containing a
# return statement. As such, it will warn when it encounters an else following a chain of
# ifs, all of them containing a return statement.
# R1706,
# :consider-using-ternary: (Consider using ternary (%s))
# Used when one of known pre-python 2.5 ternary syntax is used.
# R1707,
# :trailing-comma-tuple: (Disallow trailing comma tuple)
# In Python, a tuple is actually created by the comma symbol, not by the parentheses.
# Unfortunately, one can actually create a tuple by misplacing a trailing comma, which can
# lead to potential weird bugs in your code. You should always use parentheses explicitly
# for creating a tuple.
# R1708,
# :stop-iteration-return: (Do not raise StopIteration in generator, use return statement instead)
# According to PEP479, the raise of StopIteration to end the loop of a generator may lead to
# hard to find bugs. This PEP specify that raise StopIteration has to be replaced by a
# simple return statement
# R1709,
# :simplify-boolean-expression: (Boolean expression may be simplified to %s)
# Emitted when redundant pre-python 2.5 ternary syntax is used.
# R1710,
# :inconsistent-return-statements: (Either all return statements in a function should return an expression, or none of them should.)
# According to PEP8, if any return statement returns an expression, any return statements
# where no value is returned should explicitly state this as return None, and an explicit
# return statement should be present at the end of the function (if reachable)
# R1711,
# :useless-return: (Useless return at end of function or method)
# Emitted when a single "return" or "return None" statement is found at the end of function
# or method definition. This statement can safely be removed because Python will
# implicitly return None
# R1712,
# :consider-swap-variables: (Consider using tuple unpacking for swapping variables)
# You do not have to use a temporary variable in order to swap variables. Using "tuple
# unpacking" to directly swap variables makes the intention more clear.
# R1713,
# :consider-using-join: (Consider using str.join(sequence) for concatenating strings from an iterable)
# Using str.join(sequence) is faster, uses less memory and increases readability compared to
# for-loop iteration.
# R1714,
# :consider-using-in: (Consider merging these comparisons with "in" to %r)
# To check if a variable is equal to one of many values,combine the values into a tuple and
# check if the variable is contained "in" it instead of checking for equality against each
# of the values. This is faster and less verbose.
# R1715,
# :consider-using-get: (Consider using dict.get for getting values from a dict if a key is present or a default if not)
# Using the builtin dict.get for getting a value from a dictionary if a key is present or a
# default if not, is simpler and considered more idiomatic, although sometimes a bit
# slower
# R1716,
# :chained-comparison: (Simplify chained comparison between the operands)
# This message is emitted when pylint encounters boolean operation like"a < b and b < c",
# suggesting instead to refactor it to "a < b < c"
# R1717,
# :consider-using-dict-comprehension: (Consider using a dictionary comprehension)
# Emitted when we detect the creation of a dictionary using the dict() callable and a
# transient list. Although there is nothing syntactically wrong with this code, it is hard
# to read and can be simplified to a dict comprehension. Also it is faster since you don't
# need to create another transient list
# R1718,
# :consider-using-set-comprehension: (Consider using a set comprehension)
# Although there is nothing syntactically wrong with this code, it is hard to read and can
# be simplified to a set comprehension. Also it is faster since you don't need to create
# another transient list
# R1719,
# :simplifiable-if-expression: (The if expression can be replaced with %s)
# Used when an if expression can be replaced with 'bool(test)'.
# R1720,
# :no-else-raise: (Unnecessary "%s" after "raise")
# Used in order to highlight an unnecessary block of code following an if containing a raise
# statement. As such, it will warn when it encounters an else following a chain of ifs,
# all of them containing a raise statement.
# R1721,
# :unnecessary-comprehension: (Unnecessary use of a comprehension)
# Instead of using an identitiy comprehension, consider using the list, dict or set
# constructor. It is faster and simpler.
# R1722,
# :consider-using-sys-exit: (Consider using sys.exit())
# Instead of using exit() or quit(), consider using the sys.exit().
# R1723,
# :no-else-break: (Unnecessary "%s" after "break")
# Used in order to highlight an unnecessary block of code following an if containing a break
# statement. As such, it will warn when it encounters an else following a chain of ifs,
# all of them containing a break statement.
# R1724,
# :no-else-continue: (Unnecessary "%s" after "continue")
# Used in order to highlight an unnecessary block of code following an if containing a
# continue statement. As such, it will warn when it encounters an else following a chain
# of ifs, all of them containing a continue statement.
# W0101,