coc-pyright
Version:
Pyright extension for coc.nvim
364 lines (363 loc) • 13.3 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Pyright Configuration Schema",
"definitions": {
"diagnostic": {
"anyOf": [
{ "type": "boolean" },
{ "type": "string", "enum": [ "none", "warning", "error" ] }
]
}
},
"properties": {
"include": {
"$id": "#/properties/include",
"type": "array",
"title": "Files and directories included in type analysis",
"items": {
"$id": "#/properties/include/items",
"type": "string",
"title": "File or directory to include in type analysis",
"pattern": "^(.*)$"
}
},
"exclude": {
"$id": "#/properties/exclude",
"type": "array",
"title": "Files and directories excluded from type analysis",
"items": {
"$id": "#/properties/exclude/items",
"type": "string",
"title": "File or directory to exclude from type analysis",
"pattern": "^(.*)$"
}
},
"ignore": {
"$id": "#/properties/ignore",
"type": "array",
"title": "Files and directories whose diagnostics are suppressed",
"items": {
"$id": "#/properties/ignore/items",
"type": "string",
"title": "File or directory where diagnostics should be suppressed",
"pattern": "^(.*)$"
}
},
"strict": {
"$id": "#/properties/strict",
"type": "array",
"title": "Files and directories that should use 'strict' type checking rules",
"items": {
"$id": "#/properties/strict/items",
"type": "string",
"title": "File or directory that should use 'strict' type checking rules",
"pattern": "^(.*)$"
}
},
"typeshedPath": {
"$id": "#/properties/typingsPath",
"type": "string",
"title": "Path to directory containing typeshed type stub files",
"default": "",
"pattern": "^(.*)$"
},
"typingsPath": {
"$id": "#/properties/typingsPath",
"type": "string",
"title": "Path to directory containing custom type stub files",
"default": "",
"examples": [
"src/typestubs"
],
"pattern": "^(.*)$"
},
"strictListInference": {
"$id": "#/properties/strictListInference",
"type": "boolean",
"title": "Infer strict types for list expressions",
"default": "false"
},
"strictDictionaryInference": {
"$id": "#/properties/strictDictionaryInference",
"type": "boolean",
"title": "Infer strict types for dictionary expressions",
"default": "false"
},
"reportTypeshedErrors": {
"$id": "#/properties/reportTypeshedErrors",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of errors found within typeshed stub files",
"default": "none"
},
"reportMissingImports": {
"$id": "#/properties/reportMissingImports",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of imports that cannot be resolved",
"default": "error"
},
"reportMissingTypeStubs": {
"$id": "#/properties/reportMissingTypeStubs",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of imports that cannot be resolved to type stub files",
"default": "none"
},
"reportImportCycles": {
"$id": "#/properties/reportImportCycles",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of module imports that create cycles in import graph",
"default": "none"
},
"reportUnusedImport": {
"$id": "#/properties/reportUnusedImport",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of imported symbols that are not referenced within the source file",
"default": "none"
},
"reportUnusedClass": {
"$id": "#/properties/reportUnusedClass",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of private classes that are not accessed",
"default": "none"
},
"reportUnusedFunction": {
"$id": "#/properties/reportUnusedFunction",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of private functions or methods that are not accessed",
"default": "none"
},
"reportUnusedVariable": {
"$id": "#/properties/reportUnusedVariable",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of local variables that are not accessed",
"default": "none"
},
"reportOptionalSubscript": {
"$id": "#/properties/reportOptionalSubscript",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to subscript (index) a variable with Optional type",
"default": "none"
},
"reportOptionalMemberAccess": {
"$id": "#/properties/reportOptionalMemberAccess",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to access a member of a variable with Optional type",
"default": "none"
},
"reportOptionalCall": {
"$id": "#/properties/reportOptionalCall",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to call a variable with Optional type",
"default": "none"
},
"reportOptionalIterable": {
"$id": "#/properties/reportOptionalIterable",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to use an Optional type as an iterable value",
"default": "none"
},
"reportOptionalContextManager": {
"$id": "#/properties/reportOptionalContextManager",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to use an Optional type as a parameter to a with statement",
"default": "none"
},
"reportOptionalOperand": {
"$id": "#/properties/reportOptionalOperand",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to use an Optional type as an operand for a binary or unary operator",
"default": "none"
},
"reportUntypedFunctionDecorator": {
"$id": "#/properties/reportUntypedFunctionDecorator",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of function decorators without type annotations, which obscure function types",
"default": "none"
},
"reportUntypedClassDecorator": {
"$id": "#/properties/reportUntypedClassDecorator",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of class decorators without type annotations, which obscure class types",
"default": "none"
},
"reportUntypedBaseClass": {
"$id": "#/properties/reportUntypedBaseClass",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of a base class of an unknown type, which obscures most type checking for the class",
"default": "none"
},
"reportUntypedNamedTuple": {
"$id": "#/properties/reportUntypedNamedTuple",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of a named tuple definition that does not contain type information",
"default": "none"
},
"reportPrivateUsage": {
"$id": "#/properties/reportPrivateUsage",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of private variables and functions used outside of the owning class or module and usage of protected members outside of subclasses",
"default": "none"
},
"reportConstantRedefinition": {
"$id": "#/properties/reportConstantRedefinition",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of attempts to redefine variables that are in all-caps",
"default": "none"
},
"reportIncompatibleMethodOverride": {
"$id": "#/properties/reportIncompatibleMethodOverride",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of method overrides in subclasses that redefine the method in an incompatible way",
"default": "none"
},
"reportInvalidStringEscapeSequence": {
"$id": "#/properties/reportInvalidStringEscapeSequence",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting of invalid escape sequences used within string literals",
"default": "none"
},
"reportUnknownParameterType": {
"$id": "#/properties/reportUnknownParameterType",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting input and return parameters whose types are unknown",
"default": "none"
},
"reportUnknownLambdaType": {
"$id": "#/properties/reportUnknownLambdaType",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting input and return parameters for lambdas whose types are unknown",
"default": "none"
},
"reportUnknownVariableType": {
"$id": "#/properties/reportUnknownVariableType",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting local variables whose types are unknown",
"default": "none"
},
"reportUnknownMemberType": {
"$id": "#/properties/reportUnknownMemberType",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting class and instance variables whose types are unknown",
"default": "none"
},
"reportCallInDefaultInitializer": {
"$id": "#/properties/reportCallInDefaultInitializer",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting usage of function calls within a default value initializer expression",
"default": "none"
},
"reportUnnecessaryIsInstance": {
"$id": "#/properties/reportUnnecessaryIsInstance",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting calls to 'isinstance' where the result is statically determined to be always true or false",
"default": "none"
},
"reportUnnecessaryCast": {
"$id": "#/properties/reportUnnecessaryCast",
"$ref": "#/definitions/diagnostic",
"title": "Controls reporting calls to 'cast' that are unnecessary",
"default": "none"
},
"pythonVersion": {
"$id": "#/properties/pythonVersion",
"type": "string",
"title": "Python version to assume during type analysis",
"default": "",
"examples": [
"3.7"
],
"pattern": "^3\\.[0-9]+$"
},
"pythonPlatform": {
"$id": "#/properties/pythonPlatform",
"type": "string",
"title": "Python platform to assume during type analysis",
"default": "",
"examples": [
"Linux"
],
"pattern": "^(Linux|Windows|Darwin)$"
},
"venvPath": {
"$id": "#/properties/venvPath",
"type": "string",
"title": "Path to directory containing a folder of virtual environments",
"default": "",
"pattern": "^(.*)$"
},
"venv": {
"$id": "#/properties/venv",
"type": "string",
"title": "Name of virtual environment subdirectory within venvPath",
"default": "",
"examples": [
"python37"
],
"pattern": "^(.*)$"
},
"executionEnvironments": {
"$id": "#/properties/executionEnvironments",
"type": "array",
"title": "Analysis settings to use for specified subdirectories of code",
"items": {
"$id": "#/properties/executionEnvironments/items",
"type": "object",
"title": "Analysis settings to use for specified subdirectories of code",
"required": [
"root"
],
"properties": {
"root": {
"$id": "#/properties/executionEnvironments/items/properties/root",
"type": "string",
"title": "Path to code subdirectory to which these settings apply",
"default": "",
"pattern": "^(.*)$"
},
"extraPaths": {
"$id": "#/properties/executionEnvironments/items/properties/extraPaths",
"type": "array",
"title": "Additional import search resolution paths",
"items": {
"$id": "#/properties/executionEnvironments/items/properties/extraPaths/items",
"type": "string",
"title": "Additional import search resolution path",
"default": "",
"pattern": "^(.*)$"
}
},
"pythonVersion": {
"$id": "#/properties/pythonVersion",
"type": "string",
"title": "Python version to assume during type analysis",
"default": "",
"examples": [
"3.7"
],
"pattern": "^3\\.[0-9]+$"
},
"pythonPlatform": {
"$id": "#/properties/pythonPlatform",
"type": "string",
"title": "Python platform to assume during type analysis",
"default": "",
"examples": [
"Linux"
],
"pattern": "^(Linux|Windows|Darwin)$"
},
"venv": {
"$id": "#/properties/venv",
"type": "string",
"title": "Name of virtual environment subdirectory within venvPath",
"default": "",
"examples": [
"python37"
],
"pattern": "^(.*)$"
}
}
}
}
}
}