-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqodana.sarif.json
8348 lines (8348 loc) · 379 KB
/
qodana.sarif.json
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
{
"$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "PC",
"fullName": "Qodana",
"version": "241.17890.14",
"rules": [],
"taxa": [
{
"id": "Python",
"name": "Python"
},
{
"id": "EditorConfig",
"name": "EditorConfig"
},
{
"id": "Shell script",
"name": "Shell script"
},
{
"id": "XML",
"name": "XML"
},
{
"id": "YAML",
"name": "YAML"
},
{
"id": "JSON and JSON5",
"name": "JSON and JSON5"
},
{
"id": "RegExp",
"name": "RegExp"
},
{
"id": "Properties files",
"name": "Properties files"
},
{
"id": "Markdown",
"name": "Markdown"
},
{
"id": "HTML",
"name": "HTML"
},
{
"id": "General",
"name": "General"
},
{
"id": "ReST",
"name": "ReST"
},
{
"id": "Requirements",
"name": "Requirements"
},
{
"id": "Qodana",
"name": "Qodana"
},
{
"id": "Python/Security",
"name": "Security",
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RELAX NG",
"name": "RELAX NG"
},
{
"id": "Proofreading",
"name": "Proofreading"
},
{
"id": "Internationalization",
"name": "Internationalization"
},
{
"id": "TOML",
"name": "TOML"
},
{
"id": "Security",
"name": "Security"
},
{
"id": "Version control",
"name": "Version control"
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
"extensions": [
{
"name": "PythonCore",
"version": "241.17890.14",
"rules": [
{
"id": "PyPandasSeriesToListInspection",
"shortDescription": {
"text": "Method Series.to_list() is recommended"
},
"fullDescription": {
"text": "Reports redundant 'list' in 'list(Series.values)' statement for pandas and polars libraries. Such 'Series' values extraction can be replaced with the 'to_list()' function call. Example: list(df['column'].values)\n When the quick-fix is applied, the code changes to: df['column'].to_list()",
"markdown": "Reports redundant `list` in `list(Series.values)` statement for pandas and polars libraries.\nSuch `Series` values extraction can be replaced with the `to_list()` function call.\n\n**Example:**\n\n```\nlist(df['column'].values)\n```\n\nWhen the quick-fix is applied, the code changes to:\n\n```\ndf['column'].to_list()\n```"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyPackages",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PySetFunctionToLiteralInspection",
"shortDescription": {
"text": "Function call can be replaced with set literal"
},
"fullDescription": {
"text": "Reports calls to the 'set' function that can be replaced with the 'set' literal. Example: 'def do_mult(a, b):\n c = a * b\n return set([c, a, b])' When the quick-fix is applied, the code changes to: 'def do_mult(a, b):\n c = a * b\n return {c, a, b}'",
"markdown": "Reports calls to the `set` function that can be replaced with\nthe `set` literal.\n\n**Example:**\n\n\n def do_mult(a, b):\n c = a * b\n return set([c, a, b])\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_mult(a, b):\n c = a * b\n return {c, a, b}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PySetFunctionToLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyStatementEffectInspection",
"shortDescription": {
"text": "Statement has no effect"
},
"fullDescription": {
"text": "Reports statements that have no effect. Example: 'class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n2 + 3 # has no effect' In this example, you can either add a field 'time' to the 'Car' class or introduce variables for the problematic statements.",
"markdown": "Reports statements that have no effect.\n\n**Example:**\n\n\n class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n 2 + 3 # has no effect\n\nIn this example, you can either add a field `time` to the `Car` class or\nintroduce variables for the problematic statements."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyStatementEffect",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMandatoryEncodingInspection",
"shortDescription": {
"text": "No encoding specified for file"
},
"fullDescription": {
"text": "Reports a missing encoding comment in Python 2. Example: 'class Book(object):\n def __init__(self):\n pass' When the quick-fix is applied, the missing comment is added: '# coding=utf-8\nclass Book(object):\n def __init__(self):\n pass'",
"markdown": "Reports a missing encoding comment in Python 2.\n\n**Example:**\n\n\n class Book(object):\n def __init__(self):\n pass\n\nWhen the quick-fix is applied, the missing comment is added:\n\n\n # coding=utf-8\n class Book(object):\n def __init__(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyMandatoryEncoding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyOverridesInspection",
"shortDescription": {
"text": "Invalid usages of @override decorator"
},
"fullDescription": {
"text": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes Example: 'from typing import override\n\nclass Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\nclass Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1'",
"markdown": "Reports when a method decorated with @override doesn't have a matching method in its ancestor classes\n\n**Example:**\n\n\n from typing import override\n\n class Parent:\n def foo(self) -> int:\n return 1\n\n def bar(self, x: str) -> str:\n return x\n\n class Child(Parent):\n @override\n def foo(self) -> int:\n return 2\n\n @override # Missing super method for override function\n def baz(self) -> int:\n return 1\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyOverrides",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyInconsistentIndentationInspection",
"shortDescription": {
"text": "Inconsistent indentation"
},
"fullDescription": {
"text": "Reports inconsistent indentation in Python source files when, for example, you use a mixture of tabs and spaces in your code.",
"markdown": "Reports inconsistent indentation in Python source files when, for example,\nyou use a mixture of tabs and spaces in your code."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyInconsistentIndentation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAttributeOutsideInitInspection",
"shortDescription": {
"text": "An instance attribute is defined outside `__init__`"
},
"fullDescription": {
"text": "Reports a problem when instance attribute definition is outside '__init__' method. Example: 'class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'' When the quick-fix is applied, the code sample changes to: 'class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass'",
"markdown": "Reports a problem when instance attribute definition is outside `__init__` method.\n\n**Example:**\n\n\n class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'\n\n\nWhen the quick-fix is applied, the code sample changes to:\n\n\n class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyAttributeOutsideInit",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTypedDictInspection",
"shortDescription": {
"text": "Invalid TypedDict definition and usages"
},
"fullDescription": {
"text": "Reports invalid definition and usage of TypedDict. Example: 'from typing import TypedDict\n\n\nclass Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\nm = Movie(name=\"name\", year=1000, rate=9)\nprint(m[\"director\"]) # There is no the 'director' key in 'Movie'\ndel m[\"name\"] # The 'name' key cannot be deleted\nm[\"year\"] = \"1001\" # Expected 'int', got 'str''",
"markdown": "Reports invalid definition and usage of\n[TypedDict](https://www.python.org/dev/peps/pep-0589/).\n\n**Example:**\n\n\n from typing import TypedDict\n\n\n class Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\n m = Movie(name=\"name\", year=1000, rate=9)\n print(m[\"director\"]) # There is no the 'director' key in 'Movie'\n del m[\"name\"] # The 'name' key cannot be deleted\n m[\"year\"] = \"1001\" # Expected 'int', got 'str'\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTypedDict",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPep8Inspection",
"shortDescription": {
"text": "PEP 8 coding style violation"
},
"fullDescription": {
"text": "Reports violations of the PEP 8 coding style guide by running the bundled pycodestyle.py tool.",
"markdown": "Reports violations of the [PEP 8 coding style guide](https://www.python.org/dev/peps/pep-0008/) by running the bundled [pycodestyle.py](https://github.com/PyCQA/pycodestyle) tool."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyPep8",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMissingTypeHintsInspection",
"shortDescription": {
"text": "Missing type hinting for function definition"
},
"fullDescription": {
"text": "Reports missing type hints for function declaration in one of the two formats: parameter annotations or a type comment. Select the Only when types are known checkbox if you want the inspection check the types collected from runtime or inferred.",
"markdown": "Reports missing type hints for function declaration in\none of the two formats: parameter annotations or a type comment.\n\nSelect the **Only when types are known** checkbox if you want the inspection check\nthe types collected from runtime or inferred."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PyMissingTypeHints",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTupleItemAssignmentInspection",
"shortDescription": {
"text": "Tuple item assignment is prohibited"
},
"fullDescription": {
"text": "Reports assignments to a tuple item. Example: 't = ('red', 'blue', 'green', 'white')\nt[3] = 'black'' A quick-fix offers to replace the tuple with a list.",
"markdown": "Reports assignments to a tuple item.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n t[3] = 'black'\n\nA quick-fix offers to replace the tuple with a list."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTupleItemAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyInitNewSignatureInspection",
"shortDescription": {
"text": "Incompatible signatures of __new__ and __init__"
},
"fullDescription": {
"text": "Reports incompatible signatures of the '__new__' and '__init__' methods. Example: 'class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass' If the '__new__' and '__init__' have different arguments, then the 'MyClass' cannot be instantiated. As a fix, the IDE offers to apply the Change Signature refactoring.",
"markdown": "Reports incompatible signatures of the `__new__` and `__init__` methods.\n\n**Example:**\n\n\n class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass\n\nIf the `__new__` and `__init__` have different arguments, then the `MyClass`\ncannot be instantiated.\n\nAs a fix, the IDE offers to apply the Change Signature refactoring."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyInitNewSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDunderSlotsInspection",
"shortDescription": {
"text": "Invalid usages of classes with '__slots__' definitions"
},
"fullDescription": {
"text": "Reports invalid usages of a class with '__slots__' definitions. Example: 'class Foo:\n __slots__ = ['foo', 'bar']\n\n\nfoo = Foo()\nfoo.baz = 'spam''",
"markdown": "Reports invalid usages of a class with `__slots__` definitions.\n\n**Example:**\n\n\n class Foo:\n __slots__ = ['foo', 'bar']\n\n\n foo = Foo()\n foo.baz = 'spam'\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDunderSlots",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMissingConstructorInspection",
"shortDescription": {
"text": "Missed call to '__init__' of the super class"
},
"fullDescription": {
"text": "Reports cases when a call to the 'super' constructor in a class is missed. Example: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n pass' The 'Pear' class should have a 'super' call in the '__init__' method. When the quick-fix is applied, the code changes to: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n super().__init__()'",
"markdown": "Reports cases when a call to the `super` constructor in a class is missed.\n\n**Example:**\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n pass\n\nThe `Pear` class should have a `super` call in the `__init__`\nmethod.\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n super().__init__()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyMissingConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDefaultArgumentInspection",
"shortDescription": {
"text": "The default argument is mutable"
},
"fullDescription": {
"text": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for an argument. Default argument values are evaluated only once at function definition time, which means that modifying the default value of the argument will affect all subsequent calls of that function. Example: 'def func(s, cache={}):\n cache[s] = None' When the quick-fix is applied, the code changes to: 'def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None'",
"markdown": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for\nan argument. \n\nDefault argument values are evaluated only once at function definition time,\nwhich means that modifying the\ndefault value of the argument will affect all subsequent calls of that function.\n\n**Example:**\n\n\n def func(s, cache={}):\n cache[s] = None\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDefaultArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTestUnpassedFixtureInspection",
"shortDescription": {
"text": "Fixture is not requested by test functions"
},
"fullDescription": {
"text": "Reports if a fixture is used without being passed to test function parameters or to '@pytest.mark.usefixtures' decorator",
"markdown": "Reports if a fixture is used without being passed to test function parameters or to `@pytest.mark.usefixtures` decorator"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTestUnpassedFixture",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyShadowingBuiltinsInspection",
"shortDescription": {
"text": "Shadowing built-in names"
},
"fullDescription": {
"text": "Reports shadowing built-in names, such as 'len' or 'list'. Example: 'def len(a, b, c):\n d = a + b + c\n return d' In this code fragment, the 'len' built-in name is used. The IDE offers to apply the Rename refactoring as a fix.",
"markdown": "Reports shadowing built-in names, such as `len` or `list`.\n\n**Example:**\n\n\n def len(a, b, c):\n d = a + b + c\n return d\n\nIn this code fragment, the `len` built-in name is used. The IDE offers to\napply the Rename refactoring as a fix."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyShadowingBuiltins",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PySimplifyBooleanCheckInspection",
"shortDescription": {
"text": "Redundant boolean variable check"
},
"fullDescription": {
"text": "Reports equality comparison with a boolean literal. Example: 'def func(s):\n if s.isdigit() == True:\n return int(s)' With the quick-fix applied, the code fragment will be simplified to: 'def func(s):\n if s.isdigit():\n return int(s)'",
"markdown": "Reports equality comparison with a boolean literal.\n\n**Example:**\n\n\n def func(s):\n if s.isdigit() == True:\n return int(s)\n\nWith the quick-fix applied, the code fragment will be simplified to:\n\n\n def func(s):\n if s.isdigit():\n return int(s)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PySimplifyBooleanCheck",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMethodOverridingInspection",
"shortDescription": {
"text": "Method signature does not match signature of overridden method"
},
"fullDescription": {
"text": "Reports inconsistencies in overriding method signatures. Example: 'class Book:\n def add_title(self):\n pass\n\n\nclass Novel(Book):\n def add_title(self, text):\n pass' Parameters of the 'add_title' method in the 'Novel' class do not match the method signature specified in the 'Book' class. As a fix, the IDE offers to apply the Change Signature refactoring.",
"markdown": "Reports inconsistencies in overriding method signatures.\n\n**Example:**\n\n\n class Book:\n def add_title(self):\n pass\n\n\n class Novel(Book):\n def add_title(self, text):\n pass\n\nParameters of the `add_title` method in the `Novel` class do not match the method\nsignature specified in the `Book` class. As a fix, the IDE offers to apply the Change Signature\nrefactoring."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyMethodOverriding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PoetryPackageVersionsInspection",
"shortDescription": {
"text": "Poetry package versions"
},
"fullDescription": {
"text": "Reports outdated versions of packages in '[tool.poetry.dependencies]' and '[tool.poetry.dev-dependencies]' sections of 'pyproject.toml'.",
"markdown": "Reports outdated versions of packages in `[tool.poetry.dependencies]` and `[tool.poetry.dev-dependencies]`\nsections of `pyproject.toml`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PoetryPackageVersions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTestParametrizedInspection",
"shortDescription": {
"text": "Incorrect arguments in @pytest.mark.parametrize"
},
"fullDescription": {
"text": "Reports functions that are decorated with @pytest.mark.parametrize but do not have arguments to accept parameters of the decorator.",
"markdown": "Reports functions that are decorated with [@pytest.mark.parametrize](https://docs.pytest.org/en/stable/parametrize.html) but do not have arguments to accept\nparameters of the decorator."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTestParametrized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDecoratorInspection",
"shortDescription": {
"text": "Class-specific decorator is used outside the class"
},
"fullDescription": {
"text": "Reports usages of '@classmethod' or '@staticmethod' decorators in methods outside a class. Example: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n@classmethod\ndef change_state(self):\n pass' The 'change_state' method should not use the '@classmethod' decorator or it should be moved to the 'State' class declaration. If you apply the 'Remove decorator' action, the code changes to: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\ndef change_state(self):\n pass'",
"markdown": "Reports usages of `@classmethod` or `@staticmethod` decorators\nin methods outside a class.\n\n**Example:**\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n @classmethod\n def change_state(self):\n pass\n\nThe `change_state` method should not use the `@classmethod` decorator or it should be\nmoved to the `State` class declaration.\n\nIf you apply the `Remove decorator` action, the code changes to:\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n def change_state(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDecorator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAsyncCallInspection",
"shortDescription": {
"text": "Missing `await` syntax in coroutine calls"
},
"fullDescription": {
"text": "Reports coroutines that were called without using the 'await' syntax. Example: 'async def bar():\n pass\n\n\nasync def foo():\n bar()' After the quick-fix is applied, the code changes to: 'async def bar():\n pass\n\n\nasync def foo():\n await bar()'",
"markdown": "Reports coroutines that were called\nwithout using the `await` syntax.\n\n**Example:**\n\n\n async def bar():\n pass\n\n\n async def foo():\n bar()\n\nAfter the quick-fix is applied, the code changes to:\n\n\n async def bar():\n pass\n\n\n async def foo():\n await bar()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyAsyncCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RestRoleInspection",
"shortDescription": {
"text": "Role is not defined"
},
"fullDescription": {
"text": "Reports undefined roles in reStructuredText files. Example: '.. role:: custom\n.. role:: newcustom(emphasis)\n\nAn example of using :custom:`interpreted text`\nAn example of using :newcustom:`interpreted text`\nAn example of using :emphasis:`interpreted text`\n\n\nSome text using undefined role :undef:`interpreted text`'",
"markdown": "Reports undefined roles in reStructuredText files.\n\n**Example:**\n\n\n .. role:: custom\n .. role:: newcustom(emphasis)\n\n An example of using :custom:`interpreted text`\n An example of using :newcustom:`interpreted text`\n An example of using :emphasis:`interpreted text`\n\n\n Some text using undefined role :undef:`interpreted text`\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RestRoleInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "ReST",
"index": 11,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CommandLineInspection",
"shortDescription": {
"text": "Incorrect CLI syntax"
},
"fullDescription": {
"text": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies that option names and arguments are correct. Do not disable the inspection if you are going to use command-line interfaces like manage.py in Django.",
"markdown": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies\nthat option names and arguments are correct.\n\nDo not disable the inspection if you are going to use command-line interfaces like [manage.py in Django](https://www.jetbrains.com/help/pycharm/running-manage-py.html)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CommandLineInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyComparisonWithNoneInspection",
"shortDescription": {
"text": "Using equality operators to compare with None"
},
"fullDescription": {
"text": "Reports comparisons with 'None'. That type of comparisons should always be done with 'is' or 'is not', never the equality operators. Example: 'a = 2\n\n\nif a == None:\n print(\"Success\")' Once the quick-fix is applied, the code changes to: 'a = 2\n\n\nif a is None:\n print(\"Success\")'",
"markdown": "Reports comparisons with `None`. That type of comparisons\nshould always be done with `is` or `is not`, never\nthe equality operators.\n\n**Example:**\n\n\n a = 2\n\n\n if a == None:\n print(\"Success\")\n\nOnce the quick-fix is applied, the code changes to:\n\n\n a = 2\n\n\n if a is None:\n print(\"Success\")\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyComparisonWithNone",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 0,
"toolComponent": {
"name": "PC"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyCallingNonCallableInspection",
"shortDescription": {
"text": "Attempt to call a non-callable object"
},
"fullDescription": {
"text": "Reports a problem when you are trying to call objects that are not callable, like, for example, properties: Example: 'class Record:\n @property\n def as_json(self):\n\njson = Record().as_json()'",
"markdown": "Reports a problem when you are trying\nto call objects that are not callable, like, for example, properties:\n\n**Example:**\n\n\n class Record:\n @property\n def as_json(self):\n\n json = Record().as_json()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyCallingNonCallable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [