massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / schemas / pyrightconfig.schema.json
1 {
2   "$schema": "http://json-schema.org/draft-07/schema#",
3   "description": "Pyright Configuration Schema",
4   "allowComments": true,
5   "allowTrailingCommas": true,
6   "type": "object",
7   "definitions": {
8     "diagnostic": {
9       "anyOf": [
10         {
11           "type": "boolean"
12         },
13         {
14           "type": "string",
15           "enum": [
16             "none",
17             "information",
18             "warning",
19             "error"
20           ]
21         }
22       ]
23     }
24   },
25   "properties": {
26     "include": {
27       "$id": "#/properties/include",
28       "type": "array",
29       "title": "Files and directories included in type analysis",
30       "items": {
31         "$id": "#/properties/include/items",
32         "type": "string",
33         "title": "File or directory to include in type analysis",
34         "pattern": "^(.*)$"
35       }
36     },
37     "exclude": {
38       "$id": "#/properties/exclude",
39       "type": "array",
40       "title": "Files and directories excluded from type analysis",
41       "items": {
42         "$id": "#/properties/exclude/items",
43         "type": "string",
44         "title": "File or directory to exclude from type analysis",
45         "pattern": "^(.*)$"
46       }
47     },
48     "ignore": {
49       "$id": "#/properties/ignore",
50       "type": "array",
51       "title": "Files and directories whose diagnostics are suppressed",
52       "items": {
53         "$id": "#/properties/ignore/items",
54         "type": "string",
55         "title": "File or directory where diagnostics should be suppressed",
56         "pattern": "^(.*)$"
57       }
58     },
59     "strict": {
60       "$id": "#/properties/strict",
61       "type": "array",
62       "title": "Files and directories that should use 'strict' type checking rules",
63       "items": {
64         "$id": "#/properties/strict/items",
65         "type": "string",
66         "title": "File or directory that should use 'strict' type checking rules",
67         "pattern": "^(.*)$"
68       }
69     },
70     "typeCheckingMode": {
71       "$id": "#/properties/typeCheckingMode",
72       "type": "string",
73       "enum": [
74         "off",
75         "basic",
76         "strict"
77       ],
78       "title": "Specifies the default rule set to use for type checking",
79       "default": "basic"
80     },
81     "useLibraryCodeForTypes": {
82       "$id": "#/properties/useLibraryCodeForTypes",
83       "type": "boolean",
84       "title": "Use library implementations to extract type information when type stub is not present",
85       "default": false
86     },
87     "typeshedPath": {
88       "$id": "#/properties/typeshedPath",
89       "type": "string",
90       "title": "Path to directory containing typeshed type stub files",
91       "default": "",
92       "pattern": "^(.*)$"
93     },
94     "stubPath": {
95       "$id": "#/properties/stubPath",
96       "type": "string",
97       "title": "Path to directory containing custom type stub files",
98       "default": "",
99       "examples": [
100         "src/typestubs"
101       ],
102       "pattern": "^(.*)$"
103     },
104     "strictListInference": {
105       "$id": "#/properties/strictListInference",
106       "type": "boolean",
107       "title": "Infer strict types for list expressions",
108       "default": false
109     },
110     "strictSetInference": {
111       "$id": "#/properties/strictSetInference",
112       "type": "boolean",
113       "title": "Infer strict types for set expressions",
114       "default": false
115     },
116     "strictDictionaryInference": {
117       "$id": "#/properties/strictDictionaryInference",
118       "type": "boolean",
119       "title": "Infer strict types for dictionary expressions",
120       "default": false
121     },
122     "strictParameterNoneValue": {
123       "$id": "#/properties/strictParameterNoneValue",
124       "type": "boolean",
125       "title": "Allow implicit Optional when default parameter value is None",
126       "default": false
127     },
128     "enableTypeIgnoreComments": {
129       "$id": "#/properties/enableTypeIgnoreComments",
130       "type": "boolean",
131       "title": "Allow \"# type: ignore\" comments",
132       "default": true
133     },
134     "reportGeneralTypeIssues": {
135       "$id": "#/properties/reportGeneralTypeIssues",
136       "$ref": "#/definitions/diagnostic",
137       "title": "Controls reporting of general type issues",
138       "default": "error"
139     },
140     "reportPropertyTypeMismatch": {
141       "$id": "#/properties/reportPropertyTypeMismatch",
142       "$ref": "#/definitions/diagnostic",
143       "title": "Controls reporting of property getter/setter type mismatches",
144       "default": "none"
145     },
146     "reportFunctionMemberAccess": {
147       "$id": "#/properties/reportFunctionMemberAccess",
148       "$ref": "#/definitions/diagnostic",
149       "title": "Controls reporting of member accesses on function objects",
150       "default": "none"
151     },
152     "reportMissingImports": {
153       "$id": "#/properties/reportMissingImports",
154       "$ref": "#/definitions/diagnostic",
155       "title": "Controls reporting of imports that cannot be resolved",
156       "default": "error"
157     },
158     "reportMissingModuleSource": {
159       "$id": "#/properties/reportMissingModuleSource",
160       "$ref": "#/definitions/diagnostic",
161       "title": "Controls reporting of imports that cannot be resolved to source files",
162       "default": "warning"
163     },
164     "reportMissingTypeStubs": {
165       "$id": "#/properties/reportMissingTypeStubs",
166       "$ref": "#/definitions/diagnostic",
167       "title": "Controls reporting of imports that cannot be resolved to type stub files",
168       "default": "none"
169     },
170     "reportImportCycles": {
171       "$id": "#/properties/reportImportCycles",
172       "$ref": "#/definitions/diagnostic",
173       "title": "Controls reporting of module imports that create cycles in import graph",
174       "default": "none"
175     },
176     "reportUnusedImport": {
177       "$id": "#/properties/reportUnusedImport",
178       "$ref": "#/definitions/diagnostic",
179       "title": "Controls reporting of imported symbols that are not referenced within the source file",
180       "default": "none"
181     },
182     "reportUnusedClass": {
183       "$id": "#/properties/reportUnusedClass",
184       "$ref": "#/definitions/diagnostic",
185       "title": "Controls reporting of private classes that are not accessed",
186       "default": "none"
187     },
188     "reportUnusedFunction": {
189       "$id": "#/properties/reportUnusedFunction",
190       "$ref": "#/definitions/diagnostic",
191       "title": "Controls reporting of private functions or methods that are not accessed",
192       "default": "none"
193     },
194     "reportUnusedVariable": {
195       "$id": "#/properties/reportUnusedVariable",
196       "$ref": "#/definitions/diagnostic",
197       "title": "Controls reporting of local variables that are not accessed",
198       "default": "none"
199     },
200     "reportDuplicateImport": {
201       "$id": "#/properties/reportDuplicateImport",
202       "$ref": "#/definitions/diagnostic",
203       "title": "Controls reporting of symbols or modules that are imported more than once",
204       "default": "none"
205     },
206     "reportWildcardImportFromLibrary": {
207       "$id": "#/properties/reportWildcardImportFromLibrary",
208       "$ref": "#/definitions/diagnostic",
209       "title": "Controls reporting of wlidcard import from external library",
210       "default": "none"
211     },
212     "reportOptionalSubscript": {
213       "$id": "#/properties/reportOptionalSubscript",
214       "$ref": "#/definitions/diagnostic",
215       "title": "Controls reporting of attempts to subscript (index) a variable with Optional type",
216       "default": "error"
217     },
218     "reportOptionalMemberAccess": {
219       "$id": "#/properties/reportOptionalMemberAccess",
220       "$ref": "#/definitions/diagnostic",
221       "title": "Controls reporting of attempts to access a member of a variable with Optional type",
222       "default": "error"
223     },
224     "reportOptionalCall": {
225       "$id": "#/properties/reportOptionalCall",
226       "$ref": "#/definitions/diagnostic",
227       "title": "Controls reporting of attempts to call a variable with Optional type",
228       "default": "error"
229     },
230     "reportOptionalIterable": {
231       "$id": "#/properties/reportOptionalIterable",
232       "$ref": "#/definitions/diagnostic",
233       "title": "Controls reporting of attempts to use an Optional type as an iterable value",
234       "default": "error"
235     },
236     "reportOptionalContextManager": {
237       "$id": "#/properties/reportOptionalContextManager",
238       "$ref": "#/definitions/diagnostic",
239       "title": "Controls reporting of attempts to use an Optional type as a parameter to a with statement",
240       "default": "error"
241     },
242     "reportOptionalOperand": {
243       "$id": "#/properties/reportOptionalOperand",
244       "$ref": "#/definitions/diagnostic",
245       "title": "Controls reporting of attempts to use an Optional type as an operand for a binary or unary operator",
246       "default": "error"
247     },
248     "reportTypedDictNotRequiredAccess": {
249       "$id": "#/properties/reportTypedDictNotRequiredAccess",
250       "$ref": "#/definitions/diagnostic",
251       "title": "Controls reporting of attempts to access a non-required key in a TypedDict without a check for its presence",
252       "default": "error"
253     },
254     "reportUntypedFunctionDecorator": {
255       "$id": "#/properties/reportUntypedFunctionDecorator",
256       "$ref": "#/definitions/diagnostic",
257       "title": "Controls reporting of function decorators without type annotations, which obscure function types",
258       "default": "none"
259     },
260     "reportUntypedClassDecorator": {
261       "$id": "#/properties/reportUntypedClassDecorator",
262       "$ref": "#/definitions/diagnostic",
263       "title": "Controls reporting of class decorators without type annotations, which obscure class types",
264       "default": "none"
265     },
266     "reportUntypedBaseClass": {
267       "$id": "#/properties/reportUntypedBaseClass",
268       "$ref": "#/definitions/diagnostic",
269       "title": "Controls reporting of a base class of an unknown type, which obscures most type checking for the class",
270       "default": "none"
271     },
272     "reportUntypedNamedTuple": {
273       "$id": "#/properties/reportUntypedNamedTuple",
274       "$ref": "#/definitions/diagnostic",
275       "title": "Controls reporting of a named tuple definition that does not contain type information",
276       "default": "none"
277     },
278     "reportPrivateUsage": {
279       "$id": "#/properties/reportPrivateUsage",
280       "$ref": "#/definitions/diagnostic",
281       "title": "Controls reporting of private variables and functions used outside of the owning class or module and usage of protected members outside of subclasses",
282       "default": "none"
283     },
284     "reportPrivateImportUsage": {
285       "$id": "#/properties/reportPrivateImportUsage",
286       "$ref": "#/definitions/diagnostic",
287       "title": "Controls reporting of improper usage of symbol imported from a \"py.typed\" module that is not re-exported from that module",
288       "default": "error"
289     },
290     "reportConstantRedefinition": {
291       "$id": "#/properties/reportConstantRedefinition",
292       "$ref": "#/definitions/diagnostic",
293       "title": "Controls reporting of attempts to redefine variables that are in all-caps",
294       "default": "none"
295     },
296     "reportIncompatibleMethodOverride": {
297       "$id": "#/properties/reportIncompatibleMethodOverride",
298       "$ref": "#/definitions/diagnostic",
299       "title": "Controls reporting of method overrides in subclasses that redefine the method in an incompatible way",
300       "default": "none"
301     },
302     "reportIncompatibleVariableOverride": {
303       "$id": "#/properties/reportIncompatibleVariableOverride",
304       "$ref": "#/definitions/diagnostic",
305       "title": "Controls reporting of overrides in subclasses that redefine a variable in an incompatible way",
306       "default": "none"
307     },
308     "reportOverlappingOverload": {
309       "$id": "#/properties/reportOverlappingOverload",
310       "$ref": "#/definitions/diagnostic",
311       "title": "Controls reporting of function overloads that overlap in signature and obscure each other or do not agree on return type",
312       "default": "none"
313     },
314     "reportUninitializedInstanceVariable": {
315       "$id": "#/properties/reportUninitializedInstanceVariable",
316       "$ref": "#/definitions/diagnostic",
317       "title": "Controls reporting of instance variables that are not initialized in the constructor",
318       "default": "none"
319     },
320     "reportInvalidStringEscapeSequence": {
321       "$id": "#/properties/reportInvalidStringEscapeSequence",
322       "$ref": "#/definitions/diagnostic",
323       "title": "Controls reporting of invalid escape sequences used within string literals",
324       "default": "warning"
325     },
326     "reportUnknownParameterType": {
327       "$id": "#/properties/reportUnknownParameterType",
328       "$ref": "#/definitions/diagnostic",
329       "title": "Controls reporting input and return parameters whose types are unknown",
330       "default": "none"
331     },
332     "reportUnknownArgumentType": {
333       "$id": "#/properties/reportUnknownArgumentType",
334       "$ref": "#/definitions/diagnostic",
335       "title": "Controls reporting argument expressions whose types are unknown",
336       "default": "none"
337     },
338     "reportUnknownLambdaType": {
339       "$id": "#/properties/reportUnknownLambdaType",
340       "$ref": "#/definitions/diagnostic",
341       "title": "Controls reporting input and return parameters for lambdas whose types are unknown",
342       "default": "none"
343     },
344     "reportUnknownVariableType": {
345       "$id": "#/properties/reportUnknownVariableType",
346       "$ref": "#/definitions/diagnostic",
347       "title": "Controls reporting local variables whose types are unknown",
348       "default": "none"
349     },
350     "reportUnknownMemberType": {
351       "$id": "#/properties/reportUnknownMemberType",
352       "$ref": "#/definitions/diagnostic",
353       "title": "Controls reporting class and instance variables whose types are unknown",
354       "default": "none"
355     },
356     "reportMissingParameterType": {
357       "$id": "#/properties/reportMissingParameterType",
358       "$ref": "#/definitions/diagnostic",
359       "title": "Controls reporting input parameters that are missing a type annotation",
360       "default": "none"
361     },
362     "reportMissingTypeArgument": {
363       "$id": "#/properties/reportMissingTypeArgument",
364       "$ref": "#/definitions/diagnostic",
365       "title": "Controls reporting generic class reference with missing type arguments",
366       "default": "none"
367     },
368     "reportInvalidTypeVarUse": {
369       "$id": "#/properties/reportInvalidTypeVarUse",
370       "$ref": "#/definitions/diagnostic",
371       "title": "Controls reporting improper use of type variables within function signatures",
372       "default": "warning"
373     },
374     "reportCallInDefaultInitializer": {
375       "$id": "#/properties/reportCallInDefaultInitializer",
376       "$ref": "#/definitions/diagnostic",
377       "title": "Controls reporting usage of function calls within a default value initializer expression",
378       "default": "none"
379     },
380     "reportUnnecessaryIsInstance": {
381       "$id": "#/properties/reportUnnecessaryIsInstance",
382       "$ref": "#/definitions/diagnostic",
383       "title": "Controls reporting calls to 'isinstance' or 'issubclass' where the result is statically determined to be always true",
384       "default": "none"
385     },
386     "reportUnnecessaryCast": {
387       "$id": "#/properties/reportUnnecessaryCast",
388       "$ref": "#/definitions/diagnostic",
389       "title": "Controls reporting calls to 'cast' that are unnecessary",
390       "default": "none"
391     },
392     "reportUnnecessaryComparison": {
393       "$id": "#/properties/reportUnnecessaryComparison",
394       "$ref": "#/definitions/diagnostic",
395       "title": "Controls reporting the use of '==' or '!=' comparisons that are unnecessary",
396       "default": "none"
397     },
398     "reportAssertAlwaysTrue": {
399       "$id": "#/properties/reportAssertAlwaysTrue",
400       "$ref": "#/definitions/diagnostic",
401       "title": "Controls reporting assert expressions that will always evaluate to true",
402       "default": "warning"
403     },
404     "reportSelfClsParameterName": {
405       "$id": "#/properties/reportSelfClsParameterName",
406       "$ref": "#/definitions/diagnostic",
407       "title": "Controls reporting assert expressions that will always evaluate to true",
408       "default": "warning"
409     },
410     "reportImplicitStringConcatenation": {
411       "$id": "#/properties/reportImplicitStringConcatenation",
412       "$ref": "#/definitions/diagnostic",
413       "title": "Controls reporting usage of implicit concatenation of string literals",
414       "default": "warning"
415     },
416     "reportUnboundVariable": {
417       "$id": "#/properties/reportUnboundVariable",
418       "$ref": "#/definitions/diagnostic",
419       "title": "Controls reporting of attempts to use an unbound or possibly unbound variable",
420       "default": "error"
421     },
422     "reportUndefinedVariable": {
423       "$id": "#/properties/reportUndefinedVariable",
424       "$ref": "#/definitions/diagnostic",
425       "title": "Controls reporting of attempts to use an undefined variable",
426       "default": "error"
427     },
428     "reportInvalidStubStatement": {
429       "$id": "#/properties/reportInvalidStubStatement",
430       "$ref": "#/definitions/diagnostic",
431       "title": "Controls reporting of type stub statements that do not conform to PEP 484",
432       "default": "none"
433     },
434     "reportIncompleteStub": {
435       "$id": "#/properties/reportIncompleteStub",
436       "$ref": "#/definitions/diagnostic",
437       "title": "Controls reporting of incomplete type stubs that declare a module-level __getattr__ function",
438       "default": "none"
439     },
440     "reportUnsupportedDunderAll": {
441       "$id": "#/properties/reportUnsupportedDunderAll",
442       "$ref": "#/definitions/diagnostic",
443       "title": "Controls reporting of unsupported operations performed on __all__",
444       "default": "warning"
445     },
446     "reportUnusedCallResult": {
447       "$id": "#/properties/reportUnusedCallResult",
448       "$ref": "#/definitions/diagnostic",
449       "title": "Controls reporting of call expressions whose results are not consumed",
450       "default": "none"
451     },
452     "reportUnusedCoroutine": {
453       "$id": "#/properties/reportUnusedCoroutine",
454       "$ref": "#/definitions/diagnostic",
455       "title": "Controls reporting of call expressions that returns Coroutine whose results are not consumed",
456       "default": "error"
457     },
458     "extraPaths": {
459       "$id": "#/properties/executionEnvironments/items/properties/extraPaths",
460       "type": "array",
461       "title": "Additional import search resolution paths",
462       "items": {
463         "$id": "#/properties/executionEnvironments/items/properties/extraPaths/items",
464         "type": "string",
465         "title": "Additional import search resolution path",
466         "default": "",
467         "pattern": "^(.*)$"
468       }
469     },
470     "pythonVersion": {
471       "$id": "#/properties/pythonVersion",
472       "type": "string",
473       "title": "Python version to assume during type analysis",
474       "default": "",
475       "examples": [
476         "3.7"
477       ],
478       "pattern": "^3\\.[0-9]+$"
479     },
480     "pythonPlatform": {
481       "$id": "#/properties/pythonPlatform",
482       "type": "string",
483       "title": "Python platform to assume during type analysis",
484       "default": "",
485       "examples": [
486         "Linux"
487       ],
488       "pattern": "^(Linux|Windows|Darwin|All)$"
489     },
490     "venvPath": {
491       "$id": "#/properties/venvPath",
492       "type": "string",
493       "title": "Path to directory containing a folder of virtual environments",
494       "default": "",
495       "pattern": "^(.*)$"
496     },
497     "venv": {
498       "$id": "#/properties/venv",
499       "type": "string",
500       "title": "Name of virtual environment subdirectory within venvPath",
501       "default": "",
502       "examples": [
503         "python37"
504       ],
505       "pattern": "^(.*)$"
506     },
507     "verboseOutput": {
508       "$id": "#/properties/verboseOutput",
509       "type": "boolean",
510       "title": "Output verbose logging",
511       "default": false
512     },
513     "executionEnvironments": {
514       "$id": "#/properties/executionEnvironments",
515       "type": "array",
516       "title": "Analysis settings to use for specified subdirectories of code",
517       "items": {
518         "$id": "#/properties/executionEnvironments/items",
519         "type": "object",
520         "title": "Analysis settings to use for specified subdirectories of code",
521         "required": [
522           "root"
523         ],
524         "properties": {
525           "root": {
526             "$id": "#/properties/executionEnvironments/items/properties/root",
527             "type": "string",
528             "title": "Path to code subdirectory to which these settings apply",
529             "default": "",
530             "pattern": "^(.*)$"
531           },
532           "extraPaths": {
533             "$id": "#/properties/executionEnvironments/items/properties/extraPaths",
534             "type": "array",
535             "title": "Additional import search resolution paths",
536             "items": {
537               "$id": "#/properties/executionEnvironments/items/properties/extraPaths/items",
538               "type": "string",
539               "title": "Additional import search resolution path",
540               "default": "",
541               "pattern": "^(.*)$"
542             }
543           },
544           "pythonVersion": {
545             "$id": "#/properties/pythonVersion",
546             "type": "string",
547             "title": "Python version to assume during type analysis",
548             "default": "",
549             "examples": [
550               "3.7"
551             ],
552             "pattern": "^3\\.[0-9]+$"
553           },
554           "pythonPlatform": {
555             "$id": "#/properties/pythonPlatform",
556             "type": "string",
557             "title": "Python platform to assume during type analysis",
558             "default": "",
559             "examples": [
560               "Linux"
561             ],
562             "pattern": "^(Linux|Windows|Darwin|All)$"
563           }
564         }
565       }
566     }
567   }
568 }