diff --git a/sublime-package.json b/sublime-package.json index bb536f8..12937c5 100644 --- a/sublime-package.json +++ b/sublime-package.json @@ -44,7 +44,7 @@ }, "pyright.disableOrganizeImports": { "default": false, - "description": "Disables the \u201cOrganize Imports\u201d command.", + "description": "Disables the \"Organize Imports\" command.", "type": "boolean" }, "python.analysis.autoImportCompletions": { @@ -345,11 +345,10 @@ "/pyrightconfig.json" ], "schema": { + "$id": "sublime://pyrightconfig", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Pyright Configuration Schema", "allowComments": true, "allowTrailingCommas": true, - "type": "object", "definitions": { "diagnostic": { "anyOf": [ @@ -357,659 +356,660 @@ "type": "boolean" }, { - "type": "string", "enum": [ "none", "information", "warning", "error" - ] + ], + "type": "string" } ] } }, + "description": "Pyright Configuration Schema", "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": "^(.*)$" - } + "analyzeUnannotatedFunctions": { + "$id": "#/properties/analyzeUnannotatedFunctions", + "default": true, + "title": "Analyze and report diagnostics for functions that have no annotations", + "type": "boolean" + }, + "defineConstant": { + "$id": "#/properties/defineConstant", + "additionalProperties": { + "title": "Value of constant (boolean or string)", + "type": [ + "string", + "boolean" + ] + }, + "properties": {}, + "title": "Identifiers that should be treated as constants", + "type": "object" + }, + "deprecateTypingAliases": { + "$id": "#/properties/deprecateTypingAliases", + "default": false, + "title": "Treat typing-specific aliases to standard types as deprecated", + "type": "boolean" + }, + "disableBytesTypePromotions": { + "$id": "#/properties/disableBytesTypePromotions", + "default": false, + "title": "Do not treat `bytearray` and `memoryview` as implicit subtypes of `bytes`", + "type": "boolean" + }, + "enableExperimentalFeatures": { + "$id": "#/properties/enableExperimentalFeatures", + "default": false, + "title": "Enable the use of experimental features that are not part of the Python typing spec", + "type": "boolean" + }, + "enableTypeIgnoreComments": { + "$id": "#/properties/enableTypeIgnoreComments", + "default": true, + "title": "Allow \"# type: ignore\" comments", + "type": "boolean" }, "exclude": { "$id": "#/properties/exclude", - "type": "array", - "title": "Files and directories excluded from type analysis", "items": { "$id": "#/properties/exclude/items", - "type": "string", + "pattern": "^(.*)$", "title": "File or directory to exclude from type analysis", - "pattern": "^(.*)$" - } + "type": "string" + }, + "title": "Files and directories excluded from type analysis", + "type": "array" + }, + "executionEnvironments": { + "$id": "#/properties/executionEnvironments", + "items": { + "$id": "#/properties/executionEnvironments/items", + "properties": { + "extraPaths": { + "$id": "#/properties/executionEnvironments/items/properties/extraPaths", + "items": { + "$id": "#/properties/executionEnvironments/items/properties/extraPaths/items", + "default": "", + "pattern": "^(.*)$", + "title": "Additional import search resolution path", + "type": "string" + }, + "title": "Additional import search resolution paths", + "type": "array" + }, + "pythonPlatform": { + "$id": "#/properties/executionEnvironments/items/properties/pythonPlatform", + "default": "", + "examples": [ + "Linux" + ], + "pattern": "^(Linux|Windows|Darwin|All)$", + "title": "Python platform to assume during type analysis", + "type": "string" + }, + "pythonVersion": { + "$id": "#/properties/executionEnvironments/items/properties/pythonVersion", + "default": "", + "examples": [ + "3.7" + ], + "pattern": "^3\\.[0-9]+$", + "title": "Python version to assume during type analysis", + "type": "string" + }, + "root": { + "$id": "#/properties/executionEnvironments/items/properties/root", + "default": "", + "pattern": "^(.*)$", + "title": "Path to code subdirectory to which these settings apply", + "type": "string" + } + }, + "required": [ + "root" + ], + "title": "Analysis settings to use for specified subdirectories of code", + "type": "object" + }, + "title": "Analysis settings to use for specified subdirectories of code", + "type": "array" + }, + "extraPaths": { + "$id": "#/properties/extraPaths", + "items": { + "$id": "#/properties/extraPaths/items", + "default": "", + "pattern": "^(.*)$", + "title": "Additional import search resolution path", + "type": "string" + }, + "title": "Additional import search resolution paths", + "type": "array" }, "ignore": { "$id": "#/properties/ignore", - "type": "array", - "title": "Files and directories whose diagnostics are suppressed", "items": { "$id": "#/properties/ignore/items", - "type": "string", + "pattern": "^(.*)$", "title": "File or directory where diagnostics should be suppressed", - "pattern": "^(.*)$" - } + "type": "string" + }, + "title": "Files and directories whose diagnostics are suppressed", + "type": "array" }, - "strict": { - "$id": "#/properties/strict", - "type": "array", - "title": "Files and directories that should use 'strict' type checking rules", + "include": { + "$id": "#/properties/include", "items": { - "$id": "#/properties/strict/items", - "type": "string", - "title": "File or directory that should use 'strict' type checking rules", - "pattern": "^(.*)$" - } - }, - "defineConstant": { - "$id": "#/properties/defineConstant", - "type": "object", - "title": "Identifiers that should be treated as constants", - "properties": {}, - "additionalProperties": { - "type": [ - "string", - "boolean" - ], - "title": "Value of constant (boolean or string)" - } - }, - "typeCheckingMode": { - "$id": "#/properties/typeCheckingMode", - "type": "string", - "enum": [ - "off", - "basic", - "standard", - "strict" - ], - "title": "Specifies the default rule set to use for type checking", - "default": "standard" - }, - "useLibraryCodeForTypes": { - "$id": "#/properties/useLibraryCodeForTypes", - "type": "boolean", - "title": "Use library implementations to extract type information when type stub is not present", - "default": true + "$id": "#/properties/include/items", + "pattern": "^(.*)$", + "title": "File or directory to include in type analysis", + "type": "string" + }, + "title": "Files and directories included in type analysis", + "type": "array" }, - "typeshedPath": { - "$id": "#/properties/typeshedPath", - "type": "string", - "title": "Path to directory containing typeshed type stub files", + "pythonPlatform": { + "$id": "#/properties/pythonPlatform", "default": "", - "pattern": "^(.*)$" + "examples": [ + "Linux" + ], + "pattern": "^(Linux|Windows|Darwin|All)$", + "title": "Python platform to assume during type analysis", + "type": "string" }, - "stubPath": { - "$id": "#/properties/stubPath", - "type": "string", - "title": "Path to directory containing custom type stub files", + "pythonVersion": { + "$id": "#/properties/pythonVersion", "default": "", "examples": [ - "src/typestubs" + "3.7" ], - "pattern": "^(.*)$" - }, - "disableBytesTypePromotions": { - "$id": "#/properties/disableBytesTypePromotions", - "type": "boolean", - "title": "Do not treat `bytearray` and `memoryview` as implicit subtypes of `bytes`", - "default": false - }, - "strictListInference": { - "$id": "#/properties/strictListInference", - "type": "boolean", - "title": "Infer strict types for list expressions", - "default": false - }, - "strictSetInference": { - "$id": "#/properties/strictSetInference", - "type": "boolean", - "title": "Infer strict types for set expressions", - "default": false + "pattern": "^3\\.[0-9]+$", + "title": "Python version to assume during type analysis", + "type": "string" }, - "strictDictionaryInference": { - "$id": "#/properties/strictDictionaryInference", - "type": "boolean", - "title": "Infer strict types for dictionary expressions", - "default": false + "reportAssertAlwaysTrue": { + "$id": "#/properties/reportAssertAlwaysTrue", + "$ref": "#/definitions/diagnostic", + "default": "warning", + "title": "Controls reporting assert expressions that will always evaluate to true" }, - "analyzeUnannotatedFunctions": { - "$id": "#/properties/analyzeUnannotatedFunctions", - "type": "boolean", - "title": "Analyze and report diagnostics for functions that have no annotations", - "default": true + "reportCallInDefaultInitializer": { + "$id": "#/properties/reportCallInDefaultInitializer", + "$ref": "#/definitions/diagnostic", + "default": "none", + "title": "Controls reporting usage of function calls within a default value initializer expression" }, - "strictParameterNoneValue": { - "$id": "#/properties/strictParameterNoneValue", - "type": "boolean", - "title": "Allow implicit Optional when default parameter value is None", - "default": true + "reportConstantRedefinition": { + "$id": "#/properties/reportConstantRedefinition", + "$ref": "#/definitions/diagnostic", + "default": "none", + "title": "Controls reporting of attempts to redefine variables that are in all-caps" }, - "enableExperimentalFeatures": { - "$id": "#/properties/enableExperimentalFeatures", - "type": "boolean", - "title": "Enable the use of experimental features that are not part of the Python typing spec", - "default": false + "reportDeprecated": { + "$id": "#/properties/reportDeprecated", + "$ref": "#/definitions/diagnostic", + "default": "none", + "title": "Controls reporting of use of deprecated class or function" }, - "enableTypeIgnoreComments": { - "$id": "#/properties/enableTypeIgnoreComments", - "type": "boolean", - "title": "Allow \"# type: ignore\" comments", - "default": true + "reportDuplicateImport": { + "$id": "#/properties/reportDuplicateImport", + "$ref": "#/definitions/diagnostic", + "default": "none", + "title": "Controls reporting of symbols or modules that are imported more than once" }, - "deprecateTypingAliases": { - "$id": "#/properties/deprecateTypingAliases", - "type": "boolean", - "title": "Treat typing-specific aliases to standard types as deprecated", - "default": false + "reportFunctionMemberAccess": { + "$id": "#/properties/reportFunctionMemberAccess", + "$ref": "#/definitions/diagnostic", + "default": "error", + "title": "Controls reporting of member accesses on function objects" }, "reportGeneralTypeIssues": { "$id": "#/properties/reportGeneralTypeIssues", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of general type issues", - "default": "error" + "default": "error", + "title": "Controls reporting of general type issues" }, - "reportPropertyTypeMismatch": { - "$id": "#/properties/reportPropertyTypeMismatch", + "reportImplicitOverride": { + "$id": "#/properties/reportImplicitOverride", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of property getter/setter type mismatches", - "default": "none" + "default": "none", + "title": "Controls reporting overridden methods that are missing an `@override` decorator" }, - "reportFunctionMemberAccess": { - "$id": "#/properties/reportFunctionMemberAccess", + "reportImplicitStringConcatenation": { + "$id": "#/properties/reportImplicitStringConcatenation", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of member accesses on function objects", - "default": "error" + "default": "warning", + "title": "Controls reporting usage of implicit concatenation of string literals" }, - "reportMissingImports": { - "$id": "#/properties/reportMissingImports", + "reportImportCycles": { + "$id": "#/properties/reportImportCycles", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of imports that cannot be resolved", - "default": "error" + "default": "none", + "title": "Controls reporting of module imports that create cycles in import graph" }, - "reportMissingModuleSource": { - "$id": "#/properties/reportMissingModuleSource", + "reportIncompatibleMethodOverride": { + "$id": "#/properties/reportIncompatibleMethodOverride", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of imports that cannot be resolved to source files", - "default": "warning" + "default": "error", + "title": "Controls reporting of method overrides in subclasses that redefine the method in an incompatible way" }, - "reportMissingTypeStubs": { - "$id": "#/properties/reportMissingTypeStubs", + "reportIncompatibleVariableOverride": { + "$id": "#/properties/reportIncompatibleVariableOverride", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of imports that cannot be resolved to type stub files", - "default": "warning" + "default": "error", + "title": "Controls reporting of overrides in subclasses that redefine a variable in an incompatible way" }, - "reportImportCycles": { - "$id": "#/properties/reportImportCycles", + "reportIncompleteStub": { + "$id": "#/properties/reportIncompleteStub", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of module imports that create cycles in import graph", - "default": "none" + "default": "none", + "title": "Controls reporting of incomplete type stubs that declare a module-level __getattr__ function" }, - "reportUnusedImport": { - "$id": "#/properties/reportUnusedImport", + "reportInconsistentConstructor": { + "$id": "#/properties/reportInconsistentConstructor", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of imported symbols that are not referenced within the source file", - "default": "none" + "default": "none", + "title": "Controls reporting of __init__ and __new__ methods whose signatures are inconsistent" }, - "reportUnusedClass": { - "$id": "#/properties/reportUnusedClass", + "reportInvalidStringEscapeSequence": { + "$id": "#/properties/reportInvalidStringEscapeSequence", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of private classes that are not accessed", - "default": "none" + "default": "warning", + "title": "Controls reporting of invalid escape sequences used within string literals" }, - "reportUnusedFunction": { - "$id": "#/properties/reportUnusedFunction", + "reportInvalidStubStatement": { + "$id": "#/properties/reportInvalidStubStatement", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of private functions or methods that are not accessed", - "default": "none" + "default": "none", + "title": "Controls reporting of type stub statements that do not conform to PEP 484" }, - "reportUnusedVariable": { - "$id": "#/properties/reportUnusedVariable", + "reportInvalidTypeVarUse": { + "$id": "#/properties/reportInvalidTypeVarUse", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of local variables that are not accessed", - "default": "none" + "default": "warning", + "title": "Controls reporting improper use of type variables within function signatures" }, - "reportDuplicateImport": { - "$id": "#/properties/reportDuplicateImport", + "reportMatchNotExhaustive": { + "$id": "#/properties/reportMatchNotExhaustive", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of symbols or modules that are imported more than once", - "default": "none" + "default": "none", + "title": "Controls reporting of 'match' statements that do not exhaustively match all possible values" }, - "reportWildcardImportFromLibrary": { - "$id": "#/properties/reportWildcardImportFromLibrary", + "reportMissingImports": { + "$id": "#/properties/reportMissingImports", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of wlidcard import from external library", - "default": "warning" + "default": "error", + "title": "Controls reporting of imports that cannot be resolved" }, - "reportOptionalSubscript": { - "$id": "#/properties/reportOptionalSubscript", + "reportMissingModuleSource": { + "$id": "#/properties/reportMissingModuleSource", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to subscript (index) a variable with Optional type", - "default": "error" + "default": "warning", + "title": "Controls reporting of imports that cannot be resolved to source files" }, - "reportOptionalMemberAccess": { - "$id": "#/properties/reportOptionalMemberAccess", + "reportMissingParameterType": { + "$id": "#/properties/reportMissingParameterType", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to access a member of a variable with Optional type", - "default": "error" + "default": "none", + "title": "Controls reporting input parameters that are missing a type annotation" }, - "reportOptionalCall": { - "$id": "#/properties/reportOptionalCall", + "reportMissingSuperCall": { + "$id": "#/properties/reportMissingSuperCall", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to call a variable with Optional type", - "default": "error" + "default": "none", + "title": "Controls reporting of missing call to parent class for inherited `__init__` methods" }, - "reportOptionalIterable": { - "$id": "#/properties/reportOptionalIterable", + "reportMissingTypeArgument": { + "$id": "#/properties/reportMissingTypeArgument", + "$ref": "#/definitions/diagnostic", + "default": "none", + "title": "Controls reporting generic class reference with missing type arguments" + }, + "reportMissingTypeStubs": { + "$id": "#/properties/reportMissingTypeStubs", + "$ref": "#/definitions/diagnostic", + "default": "warning", + "title": "Controls reporting of imports that cannot be resolved to type stub files" + }, + "reportOptionalCall": { + "$id": "#/properties/reportOptionalCall", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to use an Optional type as an iterable value", - "default": "error" + "default": "error", + "title": "Controls reporting of attempts to call a variable with Optional type" }, "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": "error" + "default": "error", + "title": "Controls reporting of attempts to use an Optional type as a parameter to a with statement" }, - "reportOptionalOperand": { - "$id": "#/properties/reportOptionalOperand", + "reportOptionalIterable": { + "$id": "#/properties/reportOptionalIterable", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to use an Optional type as an operand for a binary or unary operator", - "default": "error" + "default": "error", + "title": "Controls reporting of attempts to use an Optional type as an iterable value" }, - "reportTypedDictNotRequiredAccess": { - "$id": "#/properties/reportTypedDictNotRequiredAccess", + "reportOptionalMemberAccess": { + "$id": "#/properties/reportOptionalMemberAccess", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to access a non-required key in a TypedDict without a check for its presence", - "default": "error" + "default": "error", + "title": "Controls reporting of attempts to access a member of a variable with Optional type" }, - "reportUntypedFunctionDecorator": { - "$id": "#/properties/reportUntypedFunctionDecorator", + "reportOptionalOperand": { + "$id": "#/properties/reportOptionalOperand", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of function decorators without type annotations, which obscure function types", - "default": "none" + "default": "error", + "title": "Controls reporting of attempts to use an Optional type as an operand for a binary or unary operator" }, - "reportUntypedClassDecorator": { - "$id": "#/properties/reportUntypedClassDecorator", + "reportOptionalSubscript": { + "$id": "#/properties/reportOptionalSubscript", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of class decorators without type annotations, which obscure class types", - "default": "none" + "default": "error", + "title": "Controls reporting of attempts to subscript (index) a variable with Optional type" }, - "reportUntypedBaseClass": { - "$id": "#/properties/reportUntypedBaseClass", + "reportOverlappingOverload": { + "$id": "#/properties/reportOverlappingOverload", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of a base class of an unknown type, which obscures most type checking for the class", - "default": "none" + "default": "error", + "title": "Controls reporting of function overloads that overlap in signature and obscure each other or do not agree on return type" }, - "reportUntypedNamedTuple": { - "$id": "#/properties/reportUntypedNamedTuple", + "reportPrivateImportUsage": { + "$id": "#/properties/reportPrivateImportUsage", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of a named tuple definition that does not contain type information", - "default": "none" + "default": "error", + "title": "Controls reporting of improper usage of symbol imported from a \"py.typed\" module that is not re-exported from that module" }, "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" - }, - "reportTypeCommentUsage": { - "$id": "#/properties/reportTypeCommentUsage", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of deprecated type comment usage", - "default": "none" - }, - "reportPrivateImportUsage": { - "$id": "#/properties/reportPrivateImportUsage", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of improper usage of symbol imported from a \"py.typed\" module that is not re-exported from that module", - "default": "error" + "default": "none", + "title": "Controls reporting of private variables and functions used outside of the owning class or module and usage of protected members outside of subclasses" }, - "reportConstantRedefinition": { - "$id": "#/properties/reportConstantRedefinition", + "reportPropertyTypeMismatch": { + "$id": "#/properties/reportPropertyTypeMismatch", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to redefine variables that are in all-caps", - "default": "none" + "default": "none", + "title": "Controls reporting of property getter/setter type mismatches" }, - "reportDeprecated": { - "$id": "#/properties/reportDeprecated", + "reportSelfClsParameterName": { + "$id": "#/properties/reportSelfClsParameterName", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of use of deprecated class or function", - "default": "none" + "default": "warning", + "title": "Controls reporting assert expressions that will always evaluate to true" }, - "reportIncompatibleMethodOverride": { - "$id": "#/properties/reportIncompatibleMethodOverride", + "reportShadowedImports": { + "$id": "#/properties/reportShadowedImports", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of method overrides in subclasses that redefine the method in an incompatible way", - "default": "error" + "default": "none", + "title": "Controls reporting of shadowed imports of stdlib modules" }, - "reportIncompatibleVariableOverride": { - "$id": "#/properties/reportIncompatibleVariableOverride", + "reportTypeCommentUsage": { + "$id": "#/properties/reportTypeCommentUsage", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of overrides in subclasses that redefine a variable in an incompatible way", - "default": "error" + "default": "none", + "title": "Controls reporting of deprecated type comment usage" }, - "reportInconsistentConstructor": { - "$id": "#/properties/reportInconsistentConstructor", + "reportTypedDictNotRequiredAccess": { + "$id": "#/properties/reportTypedDictNotRequiredAccess", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of __init__ and __new__ methods whose signatures are inconsistent", - "default": "none" + "default": "error", + "title": "Controls reporting of attempts to access a non-required key in a TypedDict without a check for its presence" }, - "reportOverlappingOverload": { - "$id": "#/properties/reportOverlappingOverload", + "reportUnboundVariable": { + "$id": "#/properties/reportUnboundVariable", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of function overloads that overlap in signature and obscure each other or do not agree on return type", - "default": "error" + "default": "error", + "title": "Controls reporting of attempts to use an unbound or possibly unbound variable" }, - "reportMissingSuperCall": { - "$id": "#/properties/reportMissingSuperCall", + "reportUndefinedVariable": { + "$id": "#/properties/reportUndefinedVariable", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of missing call to parent class for inherited `__init__` methods", - "default": "none" + "default": "error", + "title": "Controls reporting of attempts to use an undefined variable" }, "reportUninitializedInstanceVariable": { "$id": "#/properties/reportUninitializedInstanceVariable", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of instance variables that are not initialized in the constructor", - "default": "none" - }, - "reportInvalidStringEscapeSequence": { - "$id": "#/properties/reportInvalidStringEscapeSequence", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of invalid escape sequences used within string literals", - "default": "warning" - }, - "reportUnknownParameterType": { - "$id": "#/properties/reportUnknownParameterType", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting input and return parameters whose types are unknown", - "default": "none" + "default": "none", + "title": "Controls reporting of instance variables that are not initialized in the constructor" }, "reportUnknownArgumentType": { "$id": "#/properties/reportUnknownArgumentType", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting argument expressions whose types are unknown", - "default": "none" + "default": "none", + "title": "Controls reporting argument expressions whose types are unknown" }, "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" + "default": "none", + "title": "Controls reporting input and return parameters for lambdas whose types are unknown" }, "reportUnknownMemberType": { "$id": "#/properties/reportUnknownMemberType", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting class and instance variables whose types are unknown", - "default": "none" - }, - "reportMissingParameterType": { - "$id": "#/properties/reportMissingParameterType", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting input parameters that are missing a type annotation", - "default": "none" - }, - "reportMissingTypeArgument": { - "$id": "#/properties/reportMissingTypeArgument", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting generic class reference with missing type arguments", - "default": "none" - }, - "reportInvalidTypeVarUse": { - "$id": "#/properties/reportInvalidTypeVarUse", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting improper use of type variables within function signatures", - "default": "warning" + "default": "none", + "title": "Controls reporting class and instance variables whose types are unknown" }, - "reportCallInDefaultInitializer": { - "$id": "#/properties/reportCallInDefaultInitializer", + "reportUnknownParameterType": { + "$id": "#/properties/reportUnknownParameterType", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting usage of function calls within a default value initializer expression", - "default": "none" + "default": "none", + "title": "Controls reporting input and return parameters whose types are unknown" }, - "reportUnnecessaryIsInstance": { - "$id": "#/properties/reportUnnecessaryIsInstance", + "reportUnknownVariableType": { + "$id": "#/properties/reportUnknownVariableType", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting calls to 'isinstance' or 'issubclass' where the result is statically determined to be always true", - "default": "none" + "default": "none", + "title": "Controls reporting local variables whose types are unknown" }, "reportUnnecessaryCast": { "$id": "#/properties/reportUnnecessaryCast", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting calls to 'cast' that are unnecessary", - "default": "none" + "default": "none", + "title": "Controls reporting calls to 'cast' that are unnecessary" }, "reportUnnecessaryComparison": { "$id": "#/properties/reportUnnecessaryComparison", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting the use of '==' or '!=' comparisons that are unnecessary", - "default": "none" + "default": "none", + "title": "Controls reporting the use of '==' or '!=' comparisons that are unnecessary" }, "reportUnnecessaryContains": { "$id": "#/properties/reportUnnecessaryContains", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting the use of 'in' operations that are unnecessary", - "default": "none" - }, - "reportAssertAlwaysTrue": { - "$id": "#/properties/reportAssertAlwaysTrue", - "$ref": "#/definitions/diagnostic", - "title": "Controls reporting assert expressions that will always evaluate to true", - "default": "warning" + "default": "none", + "title": "Controls reporting the use of 'in' operations that are unnecessary" }, - "reportSelfClsParameterName": { - "$id": "#/properties/reportSelfClsParameterName", + "reportUnnecessaryIsInstance": { + "$id": "#/properties/reportUnnecessaryIsInstance", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting assert expressions that will always evaluate to true", - "default": "warning" + "default": "none", + "title": "Controls reporting calls to 'isinstance' or 'issubclass' where the result is statically determined to be always true" }, - "reportImplicitStringConcatenation": { - "$id": "#/properties/reportImplicitStringConcatenation", + "reportUnnecessaryTypeIgnoreComment": { + "$id": "#/properties/reportUnnecessaryTypeIgnoreComment", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting usage of implicit concatenation of string literals", - "default": "warning" + "default": "none", + "title": "Controls reporting of '# type: ignore' comments that have no effect'" }, - "reportUnboundVariable": { - "$id": "#/properties/reportUnboundVariable", + "reportUnsupportedDunderAll": { + "$id": "#/properties/reportUnsupportedDunderAll", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to use an unbound or possibly unbound variable", - "default": "error" + "default": "warning", + "title": "Controls reporting of unsupported operations performed on __all__" }, - "reportUndefinedVariable": { - "$id": "#/properties/reportUndefinedVariable", + "reportUntypedBaseClass": { + "$id": "#/properties/reportUntypedBaseClass", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of attempts to use an undefined variable", - "default": "error" + "default": "none", + "title": "Controls reporting of a base class of an unknown type, which obscures most type checking for the class" }, - "reportInvalidStubStatement": { - "$id": "#/properties/reportInvalidStubStatement", + "reportUntypedClassDecorator": { + "$id": "#/properties/reportUntypedClassDecorator", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of type stub statements that do not conform to PEP 484", - "default": "none" + "default": "none", + "title": "Controls reporting of class decorators without type annotations, which obscure class types" }, - "reportIncompleteStub": { - "$id": "#/properties/reportIncompleteStub", + "reportUntypedFunctionDecorator": { + "$id": "#/properties/reportUntypedFunctionDecorator", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of incomplete type stubs that declare a module-level __getattr__ function", - "default": "none" + "default": "none", + "title": "Controls reporting of function decorators without type annotations, which obscure function types" }, - "reportUnsupportedDunderAll": { - "$id": "#/properties/reportUnsupportedDunderAll", + "reportUntypedNamedTuple": { + "$id": "#/properties/reportUntypedNamedTuple", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of unsupported operations performed on __all__", - "default": "warning" + "default": "none", + "title": "Controls reporting of a named tuple definition that does not contain type information" }, "reportUnusedCallResult": { "$id": "#/properties/reportUnusedCallResult", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of call expressions whose results are not consumed", - "default": "none" + "default": "none", + "title": "Controls reporting of call expressions whose results are not consumed" + }, + "reportUnusedClass": { + "$id": "#/properties/reportUnusedClass", + "$ref": "#/definitions/diagnostic", + "default": "none", + "title": "Controls reporting of private classes that are not accessed" }, "reportUnusedCoroutine": { "$id": "#/properties/reportUnusedCoroutine", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of call expressions that returns Coroutine whose results are not consumed", - "default": "error" + "default": "error", + "title": "Controls reporting of call expressions that returns Coroutine whose results are not consumed" }, "reportUnusedExpression": { "$id": "#/properties/reportUnusedExpression", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of simple expressions whose value is not used in any way", - "default": "warning" + "default": "warning", + "title": "Controls reporting of simple expressions whose value is not used in any way" }, - "reportUnnecessaryTypeIgnoreComment": { - "$id": "#/properties/reportUnnecessaryTypeIgnoreComment", + "reportUnusedFunction": { + "$id": "#/properties/reportUnusedFunction", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of '# type: ignore' comments that have no effect'", - "default": "none" + "default": "none", + "title": "Controls reporting of private functions or methods that are not accessed" }, - "reportMatchNotExhaustive": { - "$id": "#/properties/reportMatchNotExhaustive", + "reportUnusedImport": { + "$id": "#/properties/reportUnusedImport", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of 'match' statements that do not exhaustively match all possible values", - "default": "none" + "default": "none", + "title": "Controls reporting of imported symbols that are not referenced within the source file" }, - "reportShadowedImports": { - "$id": "#/properties/reportShadowedImports", + "reportUnusedVariable": { + "$id": "#/properties/reportUnusedVariable", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting of shadowed imports of stdlib modules", - "default": "none" + "default": "none", + "title": "Controls reporting of local variables that are not accessed" }, - "reportImplicitOverride": { - "$id": "#/properties/reportImplicitOverride", + "reportWildcardImportFromLibrary": { + "$id": "#/properties/reportWildcardImportFromLibrary", "$ref": "#/definitions/diagnostic", - "title": "Controls reporting overridden methods that are missing an `@override` decorator", - "default": "none" + "default": "warning", + "title": "Controls reporting of wlidcard import from external library" }, - "extraPaths": { - "$id": "#/properties/extraPaths", - "type": "array", - "title": "Additional import search resolution paths", + "strict": { + "$id": "#/properties/strict", "items": { - "$id": "#/properties/extraPaths/items", - "type": "string", - "title": "Additional import search resolution path", - "default": "", - "pattern": "^(.*)$" - } + "$id": "#/properties/strict/items", + "pattern": "^(.*)$", + "title": "File or directory that should use 'strict' type checking rules", + "type": "string" + }, + "title": "Files and directories that should use 'strict' type checking rules", + "type": "array" }, - "pythonVersion": { - "$id": "#/properties/pythonVersion", - "type": "string", - "title": "Python version to assume during type analysis", + "strictDictionaryInference": { + "$id": "#/properties/strictDictionaryInference", + "default": false, + "title": "Infer strict types for dictionary expressions", + "type": "boolean" + }, + "strictListInference": { + "$id": "#/properties/strictListInference", + "default": false, + "title": "Infer strict types for list expressions", + "type": "boolean" + }, + "strictParameterNoneValue": { + "$id": "#/properties/strictParameterNoneValue", + "default": true, + "title": "Allow implicit Optional when default parameter value is None", + "type": "boolean" + }, + "strictSetInference": { + "$id": "#/properties/strictSetInference", + "default": false, + "title": "Infer strict types for set expressions", + "type": "boolean" + }, + "stubPath": { + "$id": "#/properties/stubPath", "default": "", "examples": [ - "3.7" + "src/typestubs" ], - "pattern": "^3\\.[0-9]+$" + "pattern": "^(.*)$", + "title": "Path to directory containing custom type stub files", + "type": "string" }, - "pythonPlatform": { - "$id": "#/properties/pythonPlatform", - "type": "string", - "title": "Python platform to assume during type analysis", - "default": "", - "examples": [ - "Linux" + "typeCheckingMode": { + "$id": "#/properties/typeCheckingMode", + "default": "standard", + "enum": [ + "off", + "basic", + "standard", + "strict" ], - "pattern": "^(Linux|Windows|Darwin|All)$" + "title": "Specifies the default rule set to use for type checking", + "type": "string" }, - "venvPath": { - "$id": "#/properties/venvPath", - "type": "string", - "title": "Path to directory containing a folder of virtual environments", + "typeshedPath": { + "$id": "#/properties/typeshedPath", "default": "", - "pattern": "^(.*)$" + "pattern": "^(.*)$", + "title": "Path to directory containing typeshed type stub files", + "type": "string" + }, + "useLibraryCodeForTypes": { + "$id": "#/properties/useLibraryCodeForTypes", + "default": true, + "title": "Use library implementations to extract type information when type stub is not present", + "type": "boolean" }, "venv": { "$id": "#/properties/venv", - "type": "string", - "title": "Name of virtual environment subdirectory within venvPath", "default": "", "examples": [ "python37" ], - "pattern": "^(.*)$" + "pattern": "^(.*)$", + "title": "Name of virtual environment subdirectory within venvPath", + "type": "string" + }, + "venvPath": { + "$id": "#/properties/venvPath", + "default": "", + "pattern": "^(.*)$", + "title": "Path to directory containing a folder of virtual environments", + "type": "string" }, "verboseOutput": { "$id": "#/properties/verboseOutput", - "type": "boolean", + "default": false, "title": "Output verbose logging", - "default": false - }, - "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/executionEnvironments/items/properties/pythonVersion", - "type": "string", - "title": "Python version to assume during type analysis", - "default": "", - "examples": [ - "3.7" - ], - "pattern": "^3\\.[0-9]+$" - }, - "pythonPlatform": { - "$id": "#/properties/executionEnvironments/items/properties/pythonPlatform", - "type": "string", - "title": "Python platform to assume during type analysis", - "default": "", - "examples": [ - "Linux" - ], - "pattern": "^(Linux|Windows|Darwin|All)$" - } - } - } + "type": "boolean" } }, - "$id": "sublime://pyrightconfig" + "type": "object" } }, { @@ -1034,4 +1034,4 @@ } ] } -} \ No newline at end of file +}