forked from astral-sh/ruff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.schema.json
1884 lines (1884 loc) · 50.1 KB
/
ruff.schema.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": "http://json-schema.org/draft-07/schema#",
"title": "Options",
"type": "object",
"properties": {
"allowed-confusables": {
"description": "A list of allowed \"confusable\" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.",
"type": [
"array",
"null"
],
"items": {
"type": "string",
"maxLength": 1,
"minLength": 1
}
},
"builtins": {
"description": "A list of builtins to treat as defined references, in addition to the system builtins.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"cache-dir": {
"description": "A path to the cache directory.\n\nBy default, Ruff stores cache results in a `.ruff_cache` directory in the current project root.\n\nHowever, Ruff will also respect the `RUFF_CACHE_DIR` environment variable, which takes precedence over that default.\n\nThis setting will override even the `RUFF_CACHE_DIR` environment variable, if set.",
"type": [
"string",
"null"
]
},
"dummy-variable-rgx": {
"description": "A regular expression used to identify \"dummy\" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.",
"type": [
"string",
"null"
]
},
"exclude": {
"description": "A list of file patterns to exclude from linting.\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).\n\nNote that you'll typically want to use [`extend-exclude`](#extend-exclude) to modify the excluded paths.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"extend": {
"description": "A path to a local `pyproject.toml` file to merge into this configuration. User home directory and environment variables will be expanded.\n\nTo resolve the current `pyproject.toml` file, Ruff will first resolve this base configuration file, then merge in any properties defined in the current configuration file.",
"type": [
"string",
"null"
]
},
"extend-exclude": {
"description": "A list of file patterns to omit from linting, in addition to those specified by `exclude`.\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"extend-ignore": {
"description": "A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.\n\nNote that `extend-ignore` is applied after resolving rules from `ignore`/`select` and a less specific rule in `extend-ignore` would overwrite a more specific rule in `select`. It is recommended to only use `extend-ignore` when extending a `pyproject.toml` file via `extend`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/RuleSelector"
}
},
"extend-select": {
"description": "A list of rule codes or prefixes to enable, in addition to those specified by `select`.\n\nNote that `extend-select` is applied after resolving rules from `ignore`/`select` and a less specific rule in `extend-select` would overwrite a more specific rule in `ignore`. It is recommended to only use `extend-select` when extending a `pyproject.toml` file via `extend`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/RuleSelector"
}
},
"external": {
"description": "A list of rule codes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"fix": {
"description": "Enable autofix behavior by-default when running `ruff` (overridden by the `--fix` and `--no-fix` command-line flags).",
"type": [
"boolean",
"null"
]
},
"fix-only": {
"description": "Like `fix`, but disables reporting on leftover violation. Implies `fix`.",
"type": [
"boolean",
"null"
]
},
"fixable": {
"description": "A list of rule codes or prefixes to consider autofixable.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/RuleSelector"
}
},
"flake8-annotations": {
"description": "Options for the `flake8-annotations` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8AnnotationsOptions"
},
{
"type": "null"
}
]
},
"flake8-bandit": {
"description": "Options for the `flake8-bandit` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8BanditOptions"
},
{
"type": "null"
}
]
},
"flake8-bugbear": {
"description": "Options for the `flake8-bugbear` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8BugbearOptions"
},
{
"type": "null"
}
]
},
"flake8-builtins": {
"description": "Options for the `flake8-builtins` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8BuiltinsOptions"
},
{
"type": "null"
}
]
},
"flake8-errmsg": {
"description": "Options for the `flake8-errmsg` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8ErrMsgOptions"
},
{
"type": "null"
}
]
},
"flake8-import-conventions": {
"description": "Options for the `flake8-import-conventions` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8ImportConventionsOptions"
},
{
"type": "null"
}
]
},
"flake8-pytest-style": {
"description": "Options for the `flake8-pytest-style` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8PytestStyleOptions"
},
{
"type": "null"
}
]
},
"flake8-quotes": {
"description": "Options for the `flake8-quotes` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8QuotesOptions"
},
{
"type": "null"
}
]
},
"flake8-tidy-imports": {
"description": "Options for the `flake8-tidy-imports` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8TidyImportsOptions"
},
{
"type": "null"
}
]
},
"flake8-unused-arguments": {
"description": "Options for the `flake8-unused-arguments` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Flake8UnusedArgumentsOptions"
},
{
"type": "null"
}
]
},
"force-exclude": {
"description": "Whether to enforce `exclude` and `extend-exclude` patterns, even for paths that are passed to Ruff explicitly. Typically, Ruff will lint any paths passed in directly, even if they would typically be excluded. Setting `force-exclude = true` will cause Ruff to respect these exclusions unequivocally.\n\nThis is useful for [`pre-commit`](https://pre-commit.com/), which explicitly passes all changed files to the [`ruff-pre-commit`](https://github.com/charliermarsh/ruff-pre-commit) plugin, regardless of whether they're marked as excluded by Ruff's own settings.",
"type": [
"boolean",
"null"
]
},
"format": {
"description": "The style in which violation messages should be formatted: `\"text\"` (default), `\"grouped\"` (group messages by file), `\"json\"` (machine-readable), `\"junit\"` (machine-readable XML), `\"github\"` (GitHub Actions annotations), `\"gitlab\"` (GitLab CI code quality report), or `\"pylint\"` (Pylint text format).",
"anyOf": [
{
"$ref": "#/definitions/SerializationFormat"
},
{
"type": "null"
}
]
},
"ignore": {
"description": "A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/RuleSelector"
}
},
"ignore-init-module-imports": {
"description": "Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be +flagged, but with a dedicated message suggesting that the import is either added to the module' +`__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).",
"type": [
"boolean",
"null"
]
},
"isort": {
"description": "Options for the `isort` plugin.",
"anyOf": [
{
"$ref": "#/definitions/IsortOptions"
},
{
"type": "null"
}
]
},
"line-length": {
"description": "The line length to use when enforcing long-lines violations (like `E501`).",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
},
"mccabe": {
"description": "Options for the `mccabe` plugin.",
"anyOf": [
{
"$ref": "#/definitions/McCabeOptions"
},
{
"type": "null"
}
]
},
"namespace-packages": {
"description": "Mark the specified directories as namespace packages. For the purpose of module resolution, Ruff will treat those directories as if they contained an `__init__.py` file.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"pep8-naming": {
"description": "Options for the `pep8-naming` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Pep8NamingOptions"
},
{
"type": "null"
}
]
},
"per-file-ignores": {
"description": "A list of mappings from file pattern to rule codes or prefixes to exclude, when considering any matching files.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/RuleSelector"
}
}
},
"pycodestyle": {
"description": "Options for the `pycodestyle` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Pycodestyle"
},
{
"type": "null"
}
]
},
"pydocstyle": {
"description": "Options for the `pydocstyle` plugin.",
"anyOf": [
{
"$ref": "#/definitions/Pydocstyle"
},
{
"type": "null"
}
]
},
"pylint": {
"description": "Options for the `pylint` plugin.",
"anyOf": [
{
"$ref": "#/definitions/PylintOptions"
},
{
"type": "null"
}
]
},
"pyupgrade": {
"description": "Options for the `pyupgrade` plugin.",
"anyOf": [
{
"$ref": "#/definitions/PyUpgradeOptions"
},
{
"type": "null"
}
]
},
"required-version": {
"description": "Require a specific version of Ruff to be running (useful for unifying results across many environments, e.g., with a `pyproject.toml` file).",
"anyOf": [
{
"$ref": "#/definitions/Version"
},
{
"type": "null"
}
]
},
"respect-gitignore": {
"description": "Whether to automatically exclude files that are ignored by `.ignore`, `.gitignore`, `.git/info/exclude`, and global `gitignore` files. Enabled by default.",
"type": [
"boolean",
"null"
]
},
"select": {
"description": "A list of rule codes or prefixes to enable. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/RuleSelector"
}
},
"show-source": {
"description": "Whether to show source code snippets when reporting lint violations (overridden by the `--show-source` command-line flag).",
"type": [
"boolean",
"null"
]
},
"src": {
"description": "The source code paths to consider, e.g., when resolving first- vs. third-party imports.\n\nAs an example: given a Python package structure like:\n\n```text my_package/ pyproject.toml src/ my_package/ __init__.py foo.py bar.py ```\n\nThe `src` directory should be included in `source` (e.g., `source = [\"src\"]`), such that when resolving imports, `my_package.foo` is considered a first-party import.\n\nThis field supports globs. For example, if you have a series of Python packages in a `python_modules` directory, `src = [\"python_modules/*\"]` would expand to incorporate all of the packages in that directory. User home directory and environment variables will also be expanded.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"target-version": {
"description": "The Python version to target, e.g., when considering automatic code upgrades, like rewriting type annotations. Note that the target version will _not_ be inferred from the _current_ Python version, and instead must be specified explicitly (as seen below).",
"anyOf": [
{
"$ref": "#/definitions/PythonVersion"
},
{
"type": "null"
}
]
},
"task-tags": {
"description": "A list of task tags to recognize (e.g., \"TODO\", \"FIXME\", \"XXX\").\n\nComments starting with these tags will be ignored by commented-out code detection (`ERA`), and skipped by line-length rules (`E501`) if `ignore-overlong-task-comments` is set to `true`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"typing-modules": {
"description": "A list of modules whose imports should be treated equivalently to members of the `typing` module.\n\nThis is useful for ensuring proper type annotation inference for projects that re-export `typing` and `typing_extensions` members from a compatibility module. If omitted, any members imported from modules apart from `typing` and `typing_extensions` will be treated as ordinary Python objects.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"unfixable": {
"description": "A list of rule codes or prefixes to consider non-autofix-able.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/RuleSelector"
}
},
"update-check": {
"description": "Enable or disable automatic update checks (overridden by the `--update-check` and `--no-update-check` command-line flags).",
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false,
"definitions": {
"ApiBan": {
"type": "object",
"required": [
"msg"
],
"properties": {
"msg": {
"description": "The message to display when the API is used.",
"type": "string"
}
},
"additionalProperties": false
},
"ConstantType": {
"type": "string",
"enum": [
"bytes",
"complex",
"float",
"int",
"str",
"tuple"
]
},
"Convention": {
"oneOf": [
{
"description": "Use Google-style docstrings.",
"type": "string",
"enum": [
"google"
]
},
{
"description": "Use NumPy-style docstrings.",
"type": "string",
"enum": [
"numpy"
]
},
{
"description": "Use PEP257-style docstrings.",
"type": "string",
"enum": [
"pep257"
]
}
]
},
"Flake8AnnotationsOptions": {
"type": "object",
"properties": {
"allow-star-arg-any": {
"description": "Whether to suppress `ANN401` for dynamically typed `*args` and `**kwargs` arguments.",
"type": [
"boolean",
"null"
]
},
"mypy-init-return": {
"description": "Whether to allow the omission of a return type hint for `__init__` if at least one argument is annotated.",
"type": [
"boolean",
"null"
]
},
"suppress-dummy-args": {
"description": "Whether to suppress `ANN000`-level violations for arguments matching the \"dummy\" variable regex (like `_`).",
"type": [
"boolean",
"null"
]
},
"suppress-none-returning": {
"description": "Whether to suppress `ANN200`-level violations for functions that meet either of the following criteria:\n\n- Contain no `return` statement. - Explicit `return` statement(s) all return `None` (explicitly or implicitly).",
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
},
"Flake8BanditOptions": {
"type": "object",
"properties": {
"hardcoded-tmp-directory": {
"description": "A list of directories to consider temporary.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"hardcoded-tmp-directory-extend": {
"description": "A list of directories to consider temporary, in addition to those specified by `hardcoded-tmp-directory`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Flake8BugbearOptions": {
"type": "object",
"properties": {
"extend-immutable-calls": {
"description": "Additional callable functions to consider \"immutable\" when evaluating, e.g., the `no-mutable-default-argument` rule (`B006`).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Flake8BuiltinsOptions": {
"type": "object",
"properties": {
"builtins-ignorelist": {
"description": "Ignore list of builtins.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Flake8ErrMsgOptions": {
"type": "object",
"properties": {
"max-string-length": {
"description": "Maximum string length for string literals in exception messages.",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
}
},
"additionalProperties": false
},
"Flake8ImportConventionsOptions": {
"type": "object",
"properties": {
"aliases": {
"description": "The conventional aliases for imports. These aliases can be extended by the `extend_aliases` option.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"extend-aliases": {
"description": "A mapping of modules to their conventional import aliases. These aliases will be added to the `aliases` mapping.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Flake8PytestStyleOptions": {
"type": "object",
"properties": {
"fixture-parentheses": {
"description": "Boolean flag specifying whether `@pytest.fixture()` without parameters should have parentheses. If the option is set to `true` (the default), `@pytest.fixture()` is valid and `@pytest.fixture` is invalid. If set to `false`, `@pytest.fixture` is valid and `@pytest.fixture()` is invalid.",
"type": [
"boolean",
"null"
]
},
"mark-parentheses": {
"description": "Boolean flag specifying whether `@pytest.mark.foo()` without parameters should have parentheses. If the option is set to `true` (the default), `@pytest.mark.foo()` is valid and `@pytest.mark.foo` is invalid. If set to `false`, `@pytest.fixture` is valid and `@pytest.mark.foo()` is invalid.",
"type": [
"boolean",
"null"
]
},
"parametrize-names-type": {
"description": "Expected type for multiple argument names in `@pytest.mark.parametrize`. The following values are supported: * `csv` — a comma-separated list, e.g. `@pytest.mark.parametrize('name1,name2', ...)` * `tuple` (default) — e.g. `@pytest.mark.parametrize(('name1', 'name2'), ...)` * `list` — e.g. `@pytest.mark.parametrize(['name1', 'name2'], ...)`",
"anyOf": [
{
"$ref": "#/definitions/ParametrizeNameType"
},
{
"type": "null"
}
]
},
"parametrize-values-row-type": {
"description": "Expected type for each row of values in `@pytest.mark.parametrize` in case of multiple parameters. The following values are supported: * `tuple` (default) — e.g. `@pytest.mark.parametrize(('name1', 'name2'), [(1, 2), (3, 4)])` * `list` — e.g. `@pytest.mark.parametrize(('name1', 'name2'), [[1, 2], [3, 4]])`",
"anyOf": [
{
"$ref": "#/definitions/ParametrizeValuesRowType"
},
{
"type": "null"
}
]
},
"parametrize-values-type": {
"description": "Expected type for the list of values rows in `@pytest.mark.parametrize`. The following values are supported: * `tuple` — e.g. `@pytest.mark.parametrize('name', (1, 2, 3))` * `list` (default) — e.g. `@pytest.mark.parametrize('name', [1, 2, 3])`",
"anyOf": [
{
"$ref": "#/definitions/ParametrizeValuesType"
},
{
"type": "null"
}
]
},
"raises-extend-require-match-for": {
"description": "List of additional exception names that require a match= parameter in a `pytest.raises()` call. This extends the default list of exceptions that require a match= parameter. This option is useful if you want to extend the default list of exceptions that require a match= parameter without having to specify the entire list. Note that this option does not remove any exceptions from the default list.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"raises-require-match-for": {
"description": "List of exception names that require a match= parameter in a `pytest.raises()` call.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Flake8QuotesOptions": {
"type": "object",
"properties": {
"avoid-escape": {
"description": "Whether to avoid using single quotes if a string contains single quotes, or vice-versa with double quotes, as per [PEP8](https://peps.python.org/pep-0008/#string-quotes). This minimizes the need to escape quotation marks within strings.",
"type": [
"boolean",
"null"
]
},
"docstring-quotes": {
"description": "Quote style to prefer for docstrings (either \"single\" (`'`) or \"double\" (`\"`)).",
"anyOf": [
{
"$ref": "#/definitions/Quote"
},
{
"type": "null"
}
]
},
"inline-quotes": {
"description": "Quote style to prefer for inline strings (either \"single\" (`'`) or \"double\" (`\"`)).",
"anyOf": [
{
"$ref": "#/definitions/Quote"
},
{
"type": "null"
}
]
},
"multiline-quotes": {
"description": "Quote style to prefer for multiline strings (either \"single\" (`'`) or \"double\" (`\"`)).",
"anyOf": [
{
"$ref": "#/definitions/Quote"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"Flake8TidyImportsOptions": {
"type": "object",
"properties": {
"ban-relative-imports": {
"description": "Whether to ban all relative imports (`\"all\"`), or only those imports that extend into the parent module or beyond (`\"parents\"`).",
"anyOf": [
{
"$ref": "#/definitions/Strictness"
},
{
"type": "null"
}
]
},
"banned-api": {
"description": "Specific modules or module members that may not be imported or accessed. Note that this rule is only meant to flag accidental uses, and can be circumvented via `eval` or `importlib`.",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/definitions/ApiBan"
}
}
},
"additionalProperties": false
},
"Flake8UnusedArgumentsOptions": {
"type": "object",
"properties": {
"ignore-variadic-names": {
"description": "Whether to allow unused variadic arguments, like `*args` and `**kwargs`.",
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
},
"ImportType": {
"type": "string",
"enum": [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder"
]
},
"IsortOptions": {
"type": "object",
"properties": {
"classes": {
"description": "An override list of tokens to always recognize as a Class for `order-by-type` regardless of casing.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"combine-as-imports": {
"description": "Combines as imports on the same line. See isort's [`combine-as-imports`](https://pycqa.github.io/isort/docs/configuration/options.html#combine-as-imports) option.",
"type": [
"boolean",
"null"
]
},
"constants": {
"description": "An override list of tokens to always recognize as a CONSTANT for `order-by-type` regardless of casing.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"extra-standard-library": {
"description": "A list of modules to consider standard-library, in addition to those known to Ruff in advance.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"force-single-line": {
"description": "Forces all from imports to appear on their own line.",
"type": [
"boolean",
"null"
]
},
"force-sort-within-sections": {
"description": "Don't sort straight-style imports (like `import sys`) before from-style imports (like `from itertools import groupby`). Instead, sort the imports by module, independent of import style.",
"type": [
"boolean",
"null"
]
},
"force-wrap-aliases": {
"description": "Force `import from` statements with multiple members and at least one alias (e.g., `import A as B`) to wrap such that every line contains exactly one member. For example, this formatting would be retained, rather than condensing to a single line:\n\n```py from .utils import ( test_directory as test_directory, test_id as test_id ) ```\n\nNote that this setting is only effective when combined with `combine-as-imports = true`. When `combine-as-imports` isn't enabled, every aliased `import from` will be given its own line, in which case, wrapping is not necessary.",
"type": [
"boolean",
"null"
]
},
"known-first-party": {
"description": "A list of modules to consider first-party, regardless of whether they can be identified as such via introspection of the local filesystem.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"known-third-party": {
"description": "A list of modules to consider third-party, regardless of whether they can be identified as such via introspection of the local filesystem.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"no-lines-before": {
"description": "A list of sections that should _not_ be delineated from the previous section via empty lines.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ImportType"
}
},
"order-by-type": {
"description": "Order imports by type, which is determined by case, in addition to alphabetically.",
"type": [
"boolean",
"null"
]
},
"relative-imports-order": {
"description": "Whether to place \"closer\" imports (fewer `.` characters, most local) before \"further\" imports (more `.` characters, least local), or vice versa.\n\nThe default (\"furthest-to-closest\") is equivalent to isort's `reverse-relative` default (`reverse-relative = false`); setting this to \"closest-to-furthest\" is equivalent to isort's `reverse-relative = true`.",
"anyOf": [
{
"$ref": "#/definitions/RelatveImportsOrder"
},
{
"type": "null"
}
]
},
"required-imports": {
"description": "Add the specified import line to all files.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"single-line-exclusions": {
"description": "One or more modules to exclude from the single line rule.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"split-on-trailing-comma": {
"description": "If a comma is placed after the last member in a multi-line import, then the imports will never be folded into one line.\n\nSee isort's [`split-on-trailing-comma`](https://pycqa.github.io/isort/docs/configuration/options.html#split-on-trailing-comma) option.",
"type": [
"boolean",
"null"
]
},
"variables": {
"description": "An override list of tokens to always recognize as a var for `order-by-type` regardless of casing.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"McCabeOptions": {
"type": "object",
"properties": {
"max-complexity": {
"description": "The maximum McCabe complexity to allow before triggering `C901` errors.",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
}
},
"additionalProperties": false
},
"ParametrizeNameType": {
"type": "string",
"enum": [
"csv",
"tuple",
"list"
]
},
"ParametrizeValuesRowType": {
"type": "string",
"enum": [
"tuple",
"list"