-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdescription.json
More file actions
1776 lines (1776 loc) · 93.4 KB
/
description.json
File metadata and controls
1776 lines (1776 loc) · 93.4 KB
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
[
{
"patternId": "E0100",
"title": "init-is-generator (E0100)",
"description": "__init__ method is a generator Used when the special class method __init__ is turned into a generator by a yield in its body."
},
{
"patternId": "E0101",
"title": "return-in-init (E0101)",
"description": "Explicit return in __init__ Used when the special class method __init__ has an explicit return value."
},
{
"patternId": "E0102",
"title": "function-redefined (E0102)",
"description": "%s already defined line %s Used when a function / class / method is redefined."
},
{
"patternId": "E0103",
"title": "not-in-loop (E0103)",
"description": "%r not properly in loop Used when break or continue keywords are used outside a loop."
},
{
"patternId": "E0104",
"title": "return-outside-function (E0104)",
"description": "Return outside function Used when a \"return\" statement is found outside a function or method."
},
{
"patternId": "E0105",
"title": "yield-outside-function (E0105)",
"description": "Yield outside function Used when a \"yield\" statement is found outside a function or method."
},
{
"patternId": "E0106",
"title": "return-arg-in-generator (E0106)",
"description": "Return with argument inside generator Used when a \"return\" statement with an argument is found in a generator function or method (e.g. with some \"yield\" statements). This message can't be emitted when using Python >= 3.3."
},
{
"patternId": "E0107",
"title": "nonexistent-operator (E0107)",
"description": "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."
},
{
"patternId": "E0108",
"title": "duplicate-argument-name (E0108)",
"description": "Duplicate argument name %r in function definition Duplicate argument names in function definitions are syntax errors."
},
{
"patternId": "E0110",
"title": "abstract-class-instantiated (E0110)",
"description": "Abstract class %r with abstract methods instantiated Used when an abstract class with abc.ABCMeta as metaclass has abstract methods and is instantiated."
},
{
"patternId": "E0111",
"title": "bad-reversed-sequence (E0111)",
"description": "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__"
},
{
"patternId": "E0112",
"title": "too-many-star-expressions (E0112)",
"description": "More than one starred expression in assignment Emitted when there are more than one starred expressions (*x) in an assignment. This is a SyntaxError."
},
{
"patternId": "E0113",
"title": "invalid-star-assignment-target (E0113)",
"description": "Starred assignment target must be in a list or tuple Emitted when a star expression is used as a starred assignment target."
},
{
"patternId": "E0114",
"title": "star-needs-assignment-target (E0114)",
"description": "Can use starred expression only in assignment target Emitted when a star expression is not used in an assignment target."
},
{
"patternId": "E0115",
"title": "nonlocal-and-global (E0115)",
"description": "Name %r is nonlocal and global Emitted when a name is both nonlocal and global."
},
{
"patternId": "E0117",
"title": "nonlocal-without-binding (E0117)",
"description": "nonlocal name %s found without binding Emitted when a nonlocal variable does not have an attached name somewhere in the parent scopes"
},
{
"patternId": "E0118",
"title": "used-prior-global-declaration (E0118)",
"description": "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."
},
{
"patternId": "E0119",
"title": "misplaced-format-function (E0119)",
"description": "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."
},
{
"patternId": "W0101",
"title": "unreachable (W0101)",
"description": "Unreachable code Used when there is some code behind a \"return\" or \"raise\" statement, which will never be accessed."
},
{
"patternId": "W0102",
"title": "dangerous-default-value (W0102)",
"description": "Dangerous default value %s as argument Used when a mutable value as list or dictionary is detected in a default value for an argument."
},
{
"patternId": "W0104",
"title": "pointless-statement (W0104)",
"description": "Statement seems to have no effect Used when a statement doesn't have (or at least seems to) any effect."
},
{
"patternId": "W0105",
"title": "pointless-string-statement (W0105)",
"description": "String statement has no effect Used when a string is used as a statement (which of course has no effect). This is a particular case of W0104 with its own message so you can easily disable it if you're using those strings as documentation, instead of comments."
},
{
"patternId": "W0106",
"title": "expression-not-assigned (W0106)",
"description": "Expression \"%s\" is assigned to nothing Used when an expression that is not a function call is assigned to nothing. Probably something else was intended."
},
{
"patternId": "W0107",
"title": "unnecessary-pass (W0107)",
"description": "Unnecessary pass statement Used when a \"pass\" statement can be removed without affecting the behaviour of the code."
},
{
"patternId": "W0108",
"title": "unnecessary-lambda (W0108)",
"description": "Lambda may not be necessary Used when the body of a lambda expression is a function call on the same argument list as the lambda itself; such lambda expressions are in all but a few cases replaceable with the function being called in the body of the lambda."
},
{
"patternId": "W0109",
"title": "duplicate-key (W0109)",
"description": "Duplicate key %r in dictionary Used when a dictionary expression binds the same key multiple times."
},
{
"patternId": "W0120",
"title": "useless-else-on-loop (W0120)",
"description": "Else clause on loop without a break statement, remove the else and de-indent all the code inside it Loops should only have an else clause if they can exit early with a break statement, otherwise the statements under else should be on the same scope as the loop itself."
},
{
"patternId": "W0122",
"title": "exec-used (W0122)",
"description": "Use of exec Raised when the 'exec' statement is used. It's dangerous to use this function for a user input, and it's also slower than actual code in general. This doesn't mean you should never use it, but you should consider alternatives first and restrict the functions available."
},
{
"patternId": "W0123",
"title": "eval-used (W0123)",
"description": "Use of eval Used when you use the \"eval\" function, to discourage its usage. Consider using ast.literal_eval for safely evaluating strings containing Python expressions from untrusted sources."
},
{
"patternId": "W0124",
"title": "confusing-with-statement (W0124)",
"description": "Following \"as\" with another context manager looks like a tuple. Emitted when a with statement component returns multiple values and uses name binding with as only for a part of those values, as in with ctx() as a, b. This can be misleading, since it's not clear if the context manager returns a tuple or if the node without a name binding is another context manager."
},
{
"patternId": "W0125",
"title": "using-constant-test (W0125)",
"description": "Using a conditional statement with a constant value Emitted when a conditional statement (If or ternary if) uses a constant value for its test. This might not be what the user intended to do."
},
{
"patternId": "W0126",
"title": "missing-parentheses-for-call-in-test (W0126)",
"description": "Using a conditional statement with potentially wrong function or method call due to missing parentheses Emitted when a conditional statement (If or ternary if) seems to wrongly call a function due to missing parentheses"
},
{
"patternId": "W0127",
"title": "self-assigning-variable (W0127)",
"description": "Assigning the same variable %r to itself Emitted when we detect that a variable is assigned to itself"
},
{
"patternId": "W0128",
"title": "redeclared-assigned-name (W0128)",
"description": "Redeclared variable %r in assignment Emitted when we detect that a variable was redeclared in the same assignment."
},
{
"patternId": "W0129",
"title": "assert-on-string-literal (W0129)",
"description": "Assert statement has a string literal as its first argument. The assert will %s fail. Used when an assert statement has a string literal as its first argument, which will cause the assert to always pass."
},
{
"patternId": "W0130",
"title": "duplicate-value (W0130)",
"description": "Duplicate value %r in set This message is emitted when a set contains the same value two or more times."
},
{
"patternId": "W0131",
"title": "named-expr-without-context (W0131)",
"description": "Named expression used without context Emitted if named expression is used to do a regular assignment outside a context like if, for, while, or a comprehension."
},
{
"patternId": "W0133",
"title": "pointless-exception-statement (W0133)",
"description": "Exception statement has no effect Used when an exception is created without being assigned, raised or returned for subsequent use elsewhere."
},
{
"patternId": "W0134",
"title": "return-in-finally (W0134)",
"description": "'return' shadowed by the 'finally' clause. Emitted when a 'return' statement is found in a 'finally' block. This will overwrite the return value of a function and should be avoided."
},
{
"patternId": "W0135",
"title": "contextmanager-generator-missing-cleanup (W0135)",
"description": "The context used in function %r will not be exited. Used when a contextmanager is used inside a generator function and the cleanup is not handled."
},
{
"patternId": "W0136",
"title": "continue-in-finally (W0136)",
"description": "'continue' discouraged inside 'finally' clause Emitted when the continue keyword is found inside a finally clause. This will raise a SyntaxWarning starting in Python 3.14."
},
{
"patternId": "W0137",
"title": "break-in-finally (W0137)",
"description": "'break' discouraged inside 'finally' clause Emitted when the break keyword is found inside a finally clause. This will raise a SyntaxWarning starting in Python 3.14."
},
{
"patternId": "W0143",
"title": "comparison-with-callable (W0143)",
"description": "Comparing against a callable, did you omit the parenthesis? This message is emitted when pylint detects that a comparison with a callable was made, which might suggest that some parenthesis were omitted, resulting in potential unwanted behaviour."
},
{
"patternId": "W0150",
"title": "lost-exception (W0150)",
"description": "%s statement in finally block may swallow exception Used when a break or a return statement is found inside the finally clause of a try...finally block: the exceptions raised in the try clause will be silently swallowed instead of being re-raised."
},
{
"patternId": "W0177",
"title": "nan-comparison (W0177)",
"description": "Comparison %s should be %s Used when an expression is compared to NaN values like numpy.NaN and float('nan')."
},
{
"patternId": "W0199",
"title": "assert-on-tuple (W0199)",
"description": "Assert called on a populated tuple. Did you mean 'assert x,y'? A call of assert on a tuple will always evaluate to true if the tuple is not empty, and will always evaluate to false if it is."
},
{
"patternId": "R0123",
"title": "literal-comparison (R0123)",
"description": "In '%s', use '%s' when comparing constant literals not '%s' ('%s') 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."
},
{
"patternId": "R0124",
"title": "comparison-with-itself (R0124)",
"description": "Redundant comparison - %s Used when something is compared against itself."
},
{
"patternId": "R0133",
"title": "comparison-of-constants (R0133)",
"description": "Comparison between constants: \"%s %s %s\" has a constant value When two literals are compared with each other the result is a constant. Using the constant directly is both easier to read and more performant. Initializing 'True' and 'False' this way is not required since Python 2.3."
},
{
"patternId": "C0103",
"title": "invalid-name (C0103)",
"description": "%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...).",
"parameters": [
{
"name": "argument-rgx",
"description": "Regular expression matching correct argument names. Overrides argument- naming-style."
},
{
"name": "attr-rgx",
"description": "Regular expression matching correct attribute names."
},
{
"name": "class-rgx",
"description": "Regular expression matching correct class names."
},
{
"name": "const-rgx",
"description": "Regular expression matching correct constant names."
},
{
"name": "function-rgx",
"description": "Regular expression matching correct function names."
},
{
"name": "method-rgx",
"description": "Regular expression matching correct method names."
},
{
"name": "module-rgx",
"description": "Regular expression matching correct module names."
},
{
"name": "variable-rgx",
"description": "Regular expression matching correct variable names."
},
{
"name": "inlinevar-rgx",
"description": "Regular expression matching correct inline iteration names."
},
{
"name": "class-attribute-rgx",
"description": "Regular expression matching correct class attribute names."
}
]
},
{
"patternId": "C0104",
"title": "disallowed-name (C0104)",
"description": "Disallowed name \"%s\" Used when the name matches bad-names or bad-names-rgxs- (unauthorized names)."
},
{
"patternId": "C0105",
"title": "typevar-name-incorrect-variance (C0105)",
"description": "Type variable name does not reflect variance%s Emitted when a TypeVar name doesn't reflect its type variance. According to PEP8, it is recommended to add suffixes '_co' and '_contra' to the variables used to declare covariant or contravariant behaviour respectively. Invariant (default) variables do not require a suffix. The message is also emitted when invariant variables do have a suffix."
},
{
"patternId": "C0112",
"title": "empty-docstring (C0112)",
"description": "Empty %s docstring Used when a module, function, class or method has an empty docstring (it would be too easy ;)."
},
{
"patternId": "C0114",
"title": "missing-module-docstring (C0114)",
"description": "Missing module docstring Used when a module has no docstring. Empty modules do not require a docstring."
},
{
"patternId": "C0115",
"title": "missing-class-docstring (C0115)",
"description": "Missing class docstring Used when a class has no docstring. Even an empty class must have a docstring."
},
{
"patternId": "C0116",
"title": "missing-function-docstring (C0116)",
"description": "Missing function or method docstring Used when a function or method has no docstring. Some special methods like __init__ do not require a docstring."
},
{
"patternId": "C0121",
"title": "singleton-comparison (C0121)",
"description": "Comparison %s should be %s Used when an expression is compared to singleton values like True, False or None."
},
{
"patternId": "C0123",
"title": "unidiomatic-typecheck (C0123)",
"description": "Use isinstance() rather than type() 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."
},
{
"patternId": "C0131",
"title": "typevar-double-variance (C0131)",
"description": "TypeVar cannot be both covariant and contravariant Emitted when both the \"covariant\" and \"contravariant\" keyword arguments are set to \"True\" in a TypeVar."
},
{
"patternId": "C0132",
"title": "typevar-name-mismatch (C0132)",
"description": "TypeVar name \"%s\" does not match assigned variable name \"%s\" Emitted when a TypeVar is assigned to a variable that does not match its name argument."
},
{
"patternId": "E0202",
"title": "method-hidden (E0202)",
"description": "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."
},
{
"patternId": "E0203",
"title": "access-member-before-definition (E0203)",
"description": "Access to member %r before its definition line %s Used when an instance member is accessed before it's actually assigned."
},
{
"patternId": "E0211",
"title": "no-method-argument (E0211)",
"description": "Method %r has no argument Used when a method which should have the bound instance as first argument has no argument defined."
},
{
"patternId": "E0213",
"title": "no-self-argument (E0213)",
"description": "Method %r 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!"
},
{
"patternId": "E0236",
"title": "invalid-slots-object (E0236)",
"description": "Invalid object %r in __slots__, must contain only non empty strings Used when an invalid (non-string) object occurs in __slots__."
},
{
"patternId": "E0237",
"title": "assigning-non-slot (E0237)",
"description": "Assigning to attribute %r not defined in class slots Used when assigning to an attribute not defined in the class slots."
},
{
"patternId": "E0238",
"title": "invalid-slots (E0238)",
"description": "Invalid __slots__ object Used when an invalid __slots__ is found in class. Only a string, an iterable or a sequence is permitted."
},
{
"patternId": "E0239",
"title": "inherit-non-class (E0239)",
"description": "Inheriting %r, which is not a class. Used when a class inherits from something which is not a class."
},
{
"patternId": "E0240",
"title": "inconsistent-mro (E0240)",
"description": "Inconsistent method resolution order for class %r Used when a class has an inconsistent method resolution order."
},
{
"patternId": "E0241",
"title": "duplicate-bases (E0241)",
"description": "Duplicate bases for class %r Duplicate use of base classes in derived classes raise TypeErrors."
},
{
"patternId": "E0242",
"title": "class-variable-slots-conflict (E0242)",
"description": "Value %r in slots conflicts with class variable Used when a value in __slots__ conflicts with a class variable, property or method."
},
{
"patternId": "E0243",
"title": "invalid-class-object (E0243)",
"description": "Invalid assignment to '__class__'. Should be a class definition but got a '%s' Used when an invalid object is assigned to a __class__ property. Only a class is permitted."
},
{
"patternId": "E0244",
"title": "invalid-enum-extension (E0244)",
"description": "Extending inherited Enum class \"%s\" Used when a class tries to extend an inherited Enum class. Doing so will raise a TypeError at runtime."
},
{
"patternId": "E0245",
"title": "declare-non-slot (E0245)",
"description": "No such name %r in __slots__ Raised when a type annotation on a class is absent from the list of names in __slots__, and __slots__ does not contain a __dict__ entry."
},
{
"patternId": "E0301",
"title": "non-iterator-returned (E0301)",
"description": "__iter__ returns non-iterator Used when an __iter__ method returns something which is not an iterable (i.e. has no __next__ method)"
},
{
"patternId": "E0302",
"title": "unexpected-special-method-signature (E0302)",
"description": "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."
},
{
"patternId": "E0303",
"title": "invalid-length-returned (E0303)",
"description": "__len__ does not return non-negative integer Used when a __len__ method returns something which is not a non-negative integer"
},
{
"patternId": "E0304",
"title": "invalid-bool-returned (E0304)",
"description": "__bool__ does not return bool Used when a __bool__ method returns something which is not a bool"
},
{
"patternId": "E0305",
"title": "invalid-index-returned (E0305)",
"description": "__index__ does not return int Used when an __index__ method returns something which is not an integer"
},
{
"patternId": "E0306",
"title": "invalid-repr-returned (E0306)",
"description": "__repr__ does not return str Used when a __repr__ method returns something which is not a string"
},
{
"patternId": "E0307",
"title": "invalid-str-returned (E0307)",
"description": "__str__ does not return str Used when a __str__ method returns something which is not a string"
},
{
"patternId": "E0308",
"title": "invalid-bytes-returned (E0308)",
"description": "__bytes__ does not return bytes Used when a __bytes__ method returns something which is not bytes"
},
{
"patternId": "E0309",
"title": "invalid-hash-returned (E0309)",
"description": "__hash__ does not return int Used when a __hash__ method returns something which is not an integer"
},
{
"patternId": "E0310",
"title": "invalid-length-hint-returned (E0310)",
"description": "__length_hint__ does not return non-negative integer Used when a __length_hint__ method returns something which is not a non- negative integer"
},
{
"patternId": "E0311",
"title": "invalid-format-returned (E0311)",
"description": "__format__ does not return str Used when a __format__ method returns something which is not a string"
},
{
"patternId": "E0312",
"title": "invalid-getnewargs-returned (E0312)",
"description": "__getnewargs__ does not return a tuple Used when a __getnewargs__ method returns something which is not a tuple"
},
{
"patternId": "E0313",
"title": "invalid-getnewargs-ex-returned (E0313)",
"description": "__getnewargs_ex__ does not return a tuple containing (tuple, dict) Used when a __getnewargs_ex__ method returns something which is not of the form tuple(tuple, dict)"
},
{
"patternId": "W0201",
"title": "attribute-defined-outside-init (W0201)",
"description": "Attribute %r defined outside __init__ Used when an instance attribute is defined outside the __init__ method."
},
{
"patternId": "W0211",
"title": "bad-staticmethod-argument (W0211)",
"description": "Static method with %r as first argument Used when a static method has \"self\" or a value specified in valid- classmethod-first-arg option or valid-metaclass-classmethod-first-arg option as first argument."
},
{
"patternId": "W0212",
"title": "protected-access (W0212)",
"description": "Access to a protected member %s of a client class Used when a protected member (i.e. class member with a name beginning with an underscore) is accessed outside the class or a descendant of the class where it's defined."
},
{
"patternId": "W0213",
"title": "implicit-flag-alias (W0213)",
"description": "Flag member %(overlap)s shares bit positions with %(sources)s Used when multiple integer values declared within an enum.IntFlag class share a common bit position."
},
{
"patternId": "W0221",
"title": "arguments-differ (W0221)",
"description": "%s %s %r method Used when a method has a different number of arguments than in the implemented interface or in an overridden method. Extra arguments with default values are ignored."
},
{
"patternId": "W0222",
"title": "signature-differs (W0222)",
"description": "Signature differs from %s %r method Used when a method signature is different than in the implemented interface or in an overridden method."
},
{
"patternId": "W0223",
"title": "abstract-method (W0223)",
"description": "Method %r is abstract in class %r but is not overridden in child class %r Used when an abstract method (i.e. raise NotImplementedError) is not overridden in concrete class."
},
{
"patternId": "W0231",
"title": "super-init-not-called (W0231)",
"description": "__init__ method from base class %r is not called Used when an ancestor class method has an __init__ method which is not called by a derived class."
},
{
"patternId": "W0233",
"title": "non-parent-init-called (W0233)",
"description": "__init__ method from a non direct base class %r is called Used when an __init__ method is called on a class which is not in the direct ancestors for the analysed class."
},
{
"patternId": "W0236",
"title": "invalid-overridden-method (W0236)",
"description": "Method %r was expected to be %r, found it instead as %r Used when we detect that a method was overridden in a way that does not match its base class which could result in potential bugs at runtime."
},
{
"patternId": "W0237",
"title": "arguments-renamed (W0237)",
"description": "%s %s %r method Used when a method parameter has a different name than in the implemented interface or in an overridden method."
},
{
"patternId": "W0238",
"title": "unused-private-member (W0238)",
"description": "Unused private member `%s.%s` Emitted when a private member of a class is defined but not used."
},
{
"patternId": "W0239",
"title": "overridden-final-method (W0239)",
"description": "Method %r overrides a method decorated with typing.final which is defined in class %r Used when a method decorated with typing.final has been overridden."
},
{
"patternId": "W0240",
"title": "subclassed-final-class (W0240)",
"description": "Class %r is a subclass of a class decorated with typing.final: %r Used when a class decorated with typing.final has been subclassed."
},
{
"patternId": "W0244",
"title": "redefined-slots-in-subclass (W0244)",
"description": "Redefined slots %r in subclass Used when a slot is re-defined in a subclass."
},
{
"patternId": "W0245",
"title": "super-without-brackets (W0245)",
"description": "Super call without brackets Used when a call to super does not have brackets and thus is not an actual call and does not work as expected."
},
{
"patternId": "W0246",
"title": "useless-parent-delegation (W0246)",
"description": "Useless parent or super() delegation in method %r Used whenever we can detect that an overridden method is useless, relying on parent or super() delegation to do the same thing as another method from the MRO."
},
{
"patternId": "R0202",
"title": "no-classmethod-decorator (R0202)",
"description": "Consider using a decorator instead of calling classmethod Used when a class method is defined without using the decorator syntax."
},
{
"patternId": "R0203",
"title": "no-staticmethod-decorator (R0203)",
"description": "Consider using a decorator instead of calling staticmethod Used when a static method is defined without using the decorator syntax."
},
{
"patternId": "R0205",
"title": "useless-object-inheritance (R0205)",
"description": "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."
},
{
"patternId": "R0206",
"title": "property-with-parameters (R0206)",
"description": "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."
},
{
"patternId": "C0202",
"title": "bad-classmethod-argument (C0202)",
"description": "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."
},
{
"patternId": "C0203",
"title": "bad-mcs-method-argument (C0203)",
"description": "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."
},
{
"patternId": "C0204",
"title": "bad-mcs-classmethod-argument (C0204)",
"description": "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."
},
{
"patternId": "C0205",
"title": "single-string-used-for-slots (C0205)",
"description": "Class __slots__ should be a non-string iterable Used when a class __slots__ is a simple string, rather than an iterable."
},
{
"patternId": "F0202",
"title": "method-check-failed (F0202)",
"description": "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."
},
{
"patternId": "R0901",
"title": "too-many-ancestors (R0901)",
"description": "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."
},
{
"patternId": "R0902",
"title": "too-many-instance-attributes (R0902)",
"description": "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."
},
{
"patternId": "R0903",
"title": "too-few-public-methods (R0903)",
"description": "Too few public methods (%s/%s) Used when class has too few public methods, so be sure it's really worth it."
},
{
"patternId": "R0904",
"title": "too-many-public-methods (R0904)",
"description": "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."
},
{
"patternId": "R0911",
"title": "too-many-return-statements (R0911)",
"description": "Too many return statements (%s/%s) Used when a function or method has too many return statement, making it hard to follow."
},
{
"patternId": "R0912",
"title": "too-many-branches (R0912)",
"description": "Too many branches (%s/%s) Used when a function or method has too many branches, making it hard to follow."
},
{
"patternId": "R0913",
"title": "too-many-arguments (R0913)",
"description": "Too many arguments (%s/%s) Used when a function or method takes too many arguments."
},
{
"patternId": "R0914",
"title": "too-many-locals (R0914)",
"description": "Too many local variables (%s/%s) Used when a function or method has too many local variables.",
"parameters": [
{
"name": "max-locals",
"description": "Maximum number of locals for function / method body."
}
]
},
{
"patternId": "R0915",
"title": "too-many-statements (R0915)",
"description": "Too many statements (%s/%s) Used when a function or method has too many statements. You should then split it in smaller functions / methods."
},
{
"patternId": "R0916",
"title": "too-many-boolean-expressions (R0916)",
"description": "Too many boolean expressions in if statement (%s/%s) Used when an if statement contains too many boolean expressions."
},
{
"patternId": "R0917",
"title": "too-many-positional-arguments (R0917)",
"description": "Too many positional arguments (%s/%s) Used when a function has too many positional arguments."
},
{
"patternId": "E0701",
"title": "bad-except-order (E0701)",
"description": "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."
},
{
"patternId": "E0702",
"title": "raising-bad-type (E0702)",
"description": "Raising %s while only classes or instances are allowed Used when something which is neither a class nor an instance is raised (i.e. a TypeError will be raised)."
},
{
"patternId": "E0704",
"title": "misplaced-bare-raise (E0704)",
"description": "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."
},
{
"patternId": "E0705",
"title": "bad-exception-cause (E0705)",
"description": "Exception cause set to something which is not an exception, nor None Used when using the syntax \"raise ... from ...\", where the exception cause is not an exception, nor None."
},
{
"patternId": "E0710",
"title": "raising-non-exception (E0710)",
"description": "Raising a class which doesn't inherit from BaseException Used when a class which doesn't inherit from BaseException is raised."
},
{
"patternId": "E0711",
"title": "notimplemented-raised (E0711)",
"description": "NotImplemented raised - should raise NotImplementedError Used when NotImplemented is raised instead of NotImplementedError"
},
{
"patternId": "E0712",
"title": "catching-non-exception (E0712)",
"description": "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."
},
{
"patternId": "W0702",
"title": "bare-except (W0702)",
"description": "No exception type(s) specified A bare except: clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all exceptions that signal program errors, use except Exception: (bare except is equivalent to except BaseException:)."
},
{
"patternId": "W0705",
"title": "duplicate-except (W0705)",
"description": "Catching previously caught exception type %s Used when an except catches a type that was already caught by a previous handler."
},
{
"patternId": "W0706",
"title": "try-except-raise (W0706)",
"description": "The except handler raises immediately Used when an except handler uses raise as its first or only operator. This is useless because it raises back the exception immediately. Remove the raise operator or the entire try-except-raise block!"
},
{
"patternId": "W0707",
"title": "raise-missing-from (W0707)",
"description": "Consider explicitly re-raising using %s'%s from %s' Python's exception chaining shows the traceback of the current exception, but also of the original exception. When you raise a new exception after another exception was caught it's likely that the second exception is a friendly re- wrapping of the first exception. In such cases raise from provides a better link between the two tracebacks in the final error."
},
{
"patternId": "W0711",
"title": "binary-op-exception (W0711)",
"description": "Exception to catch is the result of a binary \"%s\" operation Used when the exception to catch is of the form \"except A or B:\". If intending to catch multiple, rewrite as \"except (A, B):\""
},
{
"patternId": "W0715",
"title": "raising-format-tuple (W0715)",
"description": "Exception arguments suggest string formatting might be intended Used when passing multiple arguments to an exception constructor, the first of them a string literal containing what appears to be placeholders intended for formatting"
},
{
"patternId": "W0716",
"title": "wrong-exception-operation (W0716)",
"description": "Invalid exception operation. %s Used when an operation is done against an exception, but the operation is not valid for the exception in question. Usually emitted when having binary operations between exceptions in except handlers."
},
{
"patternId": "W0718",
"title": "broad-exception-caught (W0718)",
"description": "Catching too general exception %s If you use a naked except Exception: clause, you might end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when unrelated errors are hidden."
},
{
"patternId": "W0719",
"title": "broad-exception-raised (W0719)",
"description": "Raising too general exception: %s Raising exceptions that are too generic force you to catch exceptions generically too. It will force you to use a naked except Exception: clause. You might then end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when unrelated errors are hidden."
},
{
"patternId": "W0301",
"title": "unnecessary-semicolon (W0301)",
"description": "Unnecessary semicolon Used when a statement is ended by a semi-colon (\";\"), which isn't necessary (that's python, not C ;)."
},
{
"patternId": "W0311",
"title": "bad-indentation (W0311)",
"description": "Bad indentation. Found %s %s, expected %s Used when an unexpected number of indentation's tabulations or spaces has been found."
},
{
"patternId": "C0301",
"title": "line-too-long (C0301)",
"description": "Line too long (%s/%s) Used when a line is longer than a given number of characters.",
"parameters": [
{
"name": "max-line-length",
"description": "Maximum number of characters on a single line."
}
]
},
{
"patternId": "C0302",
"title": "too-many-lines (C0302)",
"description": "Too many lines in module (%s/%s) Used when a module has too many lines, reducing its readability."
},
{
"patternId": "C0303",
"title": "trailing-whitespace (C0303)",
"description": "Trailing whitespace Used when there is whitespace between the end of a line and the newline."
},
{
"patternId": "C0304",
"title": "missing-final-newline (C0304)",
"description": "Final newline missing Used when the last line in a file is missing a newline."
},
{
"patternId": "C0305",
"title": "trailing-newlines (C0305)",
"description": "Trailing newlines Used when there are trailing blank lines in a file."
},
{
"patternId": "C0321",
"title": "multiple-statements (C0321)",
"description": "More than one statement on a single line Used when more than on statement are found on the same line."
},
{
"patternId": "C0325",
"title": "superfluous-parens (C0325)",
"description": "Unnecessary parens after %r keyword Used when a single item in parentheses follows an if, for, or other keyword."
},
{
"patternId": "C0327",
"title": "mixed-line-endings (C0327)",
"description": "Mixed line endings LF and CRLF Used when there are mixed (LF and CRLF) newline signs in a file."
},
{
"patternId": "C0328",
"title": "unexpected-line-ending-format (C0328)",
"description": "Unexpected line ending format. There is '%s' while it should be '%s'. Used when there is different newline than expected."
},
{
"patternId": "E0402",
"title": "relative-beyond-top-level (E0402)",
"description": "Attempted relative import beyond top-level package Used when a relative import tries to access too many levels in the current package."
},
{
"patternId": "W0401",
"title": "wildcard-import (W0401)",
"description": "Wildcard import %s Used when from module import * is detected."
},
{
"patternId": "W0404",
"title": "reimported (W0404)",
"description": "Reimport %r (imported line %s) Used when a module is imported more than once."
},
{
"patternId": "W0406",
"title": "import-self (W0406)",
"description": "Module import itself Used when a module is importing itself."
},
{
"patternId": "W0407",
"title": "preferred-module (W0407)",
"description": "Prefer importing %r instead of %r Used when a module imported has a preferred replacement module."
},
{
"patternId": "W0410",
"title": "misplaced-future (W0410)",
"description": "__future__ import is not the first non docstring statement Python 2.5 and greater require __future__ import to be the first non docstring statement in the module."
},
{
"patternId": "W0416",
"title": "shadowed-import (W0416)",
"description": "Shadowed %r (imported line %s) Used when a module is aliased with a name that shadows another import."
},
{
"patternId": "W4901",
"title": "deprecated-module (W4901)",
"description": "Deprecated module %r A module marked as deprecated is imported."
},
{
"patternId": "R0401",
"title": "cyclic-import (R0401)",
"description": "Cyclic import (%s) Used when a cyclic import between two or more modules is detected."
},
{
"patternId": "R0402",
"title": "consider-using-from-import (R0402)",
"description": "Use 'from %s import %s' instead Emitted when a submodule of a package is imported and aliased with the same name, e.g., instead of import concurrent.futures as futures use from concurrent import futures."
},
{
"patternId": "C0410",
"title": "multiple-imports (C0410)",
"description": "Multiple imports on one line (%s) Used when import statement importing multiple modules is detected."
},
{
"patternId": "C0411",
"title": "wrong-import-order (C0411)",
"description": "%s should be placed before %s Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)."
},
{
"patternId": "C0412",
"title": "ungrouped-imports (C0412)",
"description": "Imports from package %s are not grouped Used when imports are not grouped by packages."
},
{
"patternId": "C0413",
"title": "wrong-import-position (C0413)",
"description": "Import \"%s\" should be placed at the top of the module Used when code and imports are mixed."
},
{
"patternId": "C0414",
"title": "useless-import-alias (C0414)",
"description": "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."
},
{
"patternId": "C0415",
"title": "import-outside-toplevel (C0415)",
"description": "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."
},
{
"patternId": "C3001",
"title": "unnecessary-lambda-assignment (C3001)",
"description": "Lambda expression assigned to a variable. Define a function using the \"def\" keyword instead. Used when a lambda expression is assigned to variable rather than defining a standard function with the \"def\" keyword."
},
{
"patternId": "C3002",
"title": "unnecessary-direct-lambda-call (C3002)",
"description": "Lambda expression called directly. Execute the expression inline instead. Used when a lambda expression is directly called rather than executing its contents inline."
},
{
"patternId": "E1200",
"title": "logging-unsupported-format (E1200)",
"description": "Unsupported logging format character %r (%#02x) at index %d Used when an unsupported format character is used in a logging statement format string."
},
{
"patternId": "E1201",
"title": "logging-format-truncated (E1201)",
"description": "Logging format string ends in middle of conversion specifier Used when a logging statement format string terminates before the end of a conversion specifier."
},
{
"patternId": "E1205",
"title": "logging-too-many-args (E1205)",
"description": "Too many arguments for logging format string Used when a logging format string is given too many arguments."
},
{
"patternId": "E1206",
"title": "logging-too-few-args (E1206)",
"description": "Not enough arguments for logging format string Used when a logging format string is given too few arguments."
},
{
"patternId": "W1201",
"title": "logging-not-lazy (W1201)",
"description": "Use %s formatting in logging functions Used when a logging statement has a call form of \"logging.<logging method>(format_string % (format_args...))\". Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-fstring- interpolation is disabled then you can use fstring formatting. If logging- format-interpolation is disabled then you can use str.format."
},
{
"patternId": "W1202",
"title": "logging-format-interpolation (W1202)",
"description": "Use %s formatting in logging functions Used when a logging statement has a call form of \"logging.<logging method>(format_string.format(format_args...))\". Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-fstring- interpolation is disabled then you can use fstring formatting. If logging- not-lazy is disabled then you can use % formatting as normal."
},
{
"patternId": "W1203",
"title": "logging-fstring-interpolation (W1203)",
"description": "Use %s formatting in logging functions Used when a logging statement has a call form of \"logging.<logging method>(f\"...\")\".Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-format-interpolation is disabled then you can use str.format. If logging-not-lazy is disabled then you can use % formatting as normal."
},
{
"patternId": "W0511",
"title": "fixme (W0511)",
"description": "Used when a warning note as FIXME or XXX is detected."
},
{
"patternId": "I0023",
"title": "use-symbolic-message-instead (I0023)",
"description": "Used when a message is enabled or disabled by id."
},
{
"patternId": "E4702",
"title": "modified-iterating-dict (E4702)",
"description": "Iterated dict '%s' is being modified inside for loop body, iterate through a copy of it instead. Emitted when items are added or removed to a dict being iterated through. Doing so raises a RuntimeError."
},
{
"patternId": "E4703",
"title": "modified-iterating-set (E4703)",
"description": "Iterated set '%s' is being modified inside for loop body, iterate through a copy of it instead. Emitted when items are added or removed to a set being iterated through. Doing so raises a RuntimeError."
},
{
"patternId": "W4701",
"title": "modified-iterating-list (W4701)",
"description": "Iterated list '%s' is being modified inside for loop body, consider iterating through a copy of it instead. Emitted when items are added or removed to a list being iterated through. Doing so can result in unexpected behaviour, that is why it is preferred to use a copy of the list."
},
{
"patternId": "E1003",
"title": "bad-super-call (E1003)",
"description": "Bad first argument %r given to super() Used when another argument than the current class is given as first argument of the super builtin."
},
{
"patternId": "R1701",
"title": "consider-merging-isinstance (R1701)",
"description": "Consider merging these isinstance calls to isinstance(%s, (%s)) Used when multiple consecutive isinstance calls can be merged into one."
},
{
"patternId": "R1702",
"title": "too-many-nested-blocks (R1702)",
"description": "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."
},
{
"patternId": "R1703",
"title": "simplifiable-if-statement (R1703)",
"description": "The if statement can be replaced with %s Used when an if statement can be replaced with 'bool(test)'."
},
{
"patternId": "R1704",
"title": "redefined-argument-from-local (R1704)",
"description": "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."
},
{
"patternId": "R1705",
"title": "no-else-return (R1705)",
"description": "Unnecessary \"%s\" after \"return\", %s Used in order to highlight an unnecessary block of code following an if, or a try/except 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."
},
{
"patternId": "R1706",
"title": "consider-using-ternary (R1706)",
"description": "Consider using ternary (%s) Used when one of known pre-python 2.5 ternary syntax is used."
},
{
"patternId": "R1707",
"title": "trailing-comma-tuple (R1707)",
"description": "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."
},