{ "name": "vscode-pylance", "displayName": "Pylance", "description": "A performant, feature-rich language server for Python in VS Code", "version": "2021.8.0", "license": "SEE LICENSE IN LICENSE.txt", "author": { "name": "Microsoft Corporation" }, "publisher": "ms-python", "private": true, "bugs": { "url": "https://github.com/microsoft/pylance-release/issues" }, "repository": { "type": "git", "url": "https://github.com/microsoft/pylance-release" }, "engines": { "vscode": "^1.57.0" }, "keywords": [ "python" ], "categories": [ "Programming Languages" ], "icon": "images/icon.png", "main": "./dist/extension.bundle.js", "activationEvents": [ "onLanguage:python", "workspaceContains:pyrightconfig.json" ], "extensionDependencies": [ "ms-python.python" ], "contributes": { "commands": [ { "command": "pylance.reportIssue", "title": "Pylance: Report Issue..." } ], "menus": { "commandPalette": [ { "command": "pylance.reportIssue" } ] }, "configurationDefaults": { "[python]": { "editor.wordBasedSuggestions": false } }, "configuration": { "type": "object", "title": "Pylance", "properties": { "pylance.insidersChannel": { "type": "string", "default": "off", "description": "Pylance insiders download channel.", "enum": [ "off", "daily" ], "enumDescriptions": [ "Do not check for insiders updates.", "Automatically check for and install insiders updates daily." ], "scope": "application" }, "python.analysis.completeFunctionParens": { "type": "boolean", "default": false, "description": "Add parentheses to function completions.", "scope": "resource" }, "python.analysis.autoImportCompletions": { "type": "boolean", "default": true, "description": "Offer auto-import completions.", "scope": "resource" }, "python.analysis.autoSearchPaths": { "type": "boolean", "default": true, "description": "Automatically add common search paths like 'src'.", "scope": "resource" }, "python.analysis.stubPath": { "type": "string", "default": "typings", "description": "Path to directory containing custom type stub files.", "scope": "resource" }, "python.analysis.diagnosticMode": { "type": "string", "default": "openFilesOnly", "description": "Analysis mode for diagnostics.", "enum": [ "openFilesOnly", "workspace" ], "enumDescriptions": [ "Analyzes and reports errors on only open files.", "Analyzes and reports errors on all files in the workspace." ], "scope": "resource" }, "python.analysis.extraPaths": { "type": "array", "default": [], "items": { "type": "string" }, "description": "Additional import search resolution paths", "scope": "resource" }, "python.analysis.useLibraryCodeForTypes": { "type": "boolean", "default": true, "description": "Use library implementations to extract type information when type stub is not present.", "scope": "resource" }, "python.analysis.typeCheckingMode": { "type": "string", "default": "off", "enum": [ "off", "basic", "strict" ], "description": "Defines the default rule set for type checking.", "enumDescriptions": [ "Surfaces diagnostics for invalid syntax, unresolved imports, undefined variables.", "All \"off\" rules + basic type checking rules.", "All \"off\" rules + all type checking rules." ], "scope": "resource" }, "python.analysis.diagnosticSeverityOverrides": { "type": "object", "default": {}, "description": "Allows a user to override the severity levels for individual diagnostics.", "scope": "resource", "properties": { "reportGeneralTypeIssues": { "type": "string", "description": "Diagnostics for general type inconsistencies, unsupported operations, argument/parameter mismatches, etc. Covers all of the basic type-checking rules not covered by other rules. Does not include syntax errors.", "default": "error", "enum": [ "none", "information", "warning", "error" ] }, "reportPropertyTypeMismatch": { "type": "string", "description": "Diagnostics for property whose setter and getter have mismatched types.", "default": "error", "enum": [ "none", "information", "warning", "error" ] }, "reportFunctionMemberAccess": { "type": "string", "description": "Diagnostics for member accesses on functions.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportMissingImports": { "type": "string", "description": "Diagnostics for imports that have no corresponding imported python file or type stub file.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportMissingModuleSource": { "type": "string", "description": "Diagnostics for imports that have no corresponding source file. This happens when a type stub is found, but the module source file was not found, indicating that the code may fail at runtime when using this execution environment. Type checking will be done using the type stub.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportMissingTypeStubs": { "type": "string", "description": "Diagnostics for imports that have no corresponding type stub file (either a typeshed file or a custom type stub). The type checker requires type stubs to do its best job at analysis.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportImportCycles": { "type": "string", "description": "Diagnostics for cyclical import chains. These are not errors in Python, but they do slow down type analysis and often hint at architectural layering issues. Generally, they should be avoided.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnusedImport": { "type": "string", "description": "Diagnostics for an imported symbol that is not referenced within that file.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnusedClass": { "type": "string", "description": "Diagnostics for a class with a private name (starting with an underscore) that is not accessed.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnusedFunction": { "type": "string", "description": "Diagnostics for a function or method with a private name (starting with an underscore) that is not accessed.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnusedVariable": { "type": "string", "description": "Diagnostics for a variable that is not accessed.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportDuplicateImport": { "type": "string", "description": "Diagnostics for an imported symbol or module that is imported more than once.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportWildcardImportFromLibrary": { "type": "string", "description": "Diagnostics for an wildcard import from an external library.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOptionalSubscript": { "type": "string", "description": "Diagnostics for an attempt to subscript (index) a variable with an Optional type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOptionalMemberAccess": { "type": "string", "description": "Diagnostics for an attempt to access a member of a variable with an Optional type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOptionalCall": { "type": "string", "description": "Diagnostics for an attempt to call a variable with an Optional type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOptionalIterable": { "type": "string", "description": "Diagnostics for an attempt to use an Optional type as an iterable value (e.g. within a for statement).", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOptionalContextManager": { "type": "string", "description": "Diagnostics for an attempt to use an Optional type as a context manager (as a parameter to a with statement).", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOptionalOperand": { "type": "string", "description": "Diagnostics for an attempt to use an Optional type as an operand to a binary or unary operator (like '+', '==', 'or', 'not').", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportTypedDictNotRequiredAccess": { "type": "string", "description": "Diagnostics for an attempt to access a non-required key within a TypedDict without a check for its presence.", "default": "error", "enum": [ "none", "information", "warning", "error" ] }, "reportUntypedFunctionDecorator": { "type": "string", "description": "Diagnostics for function decorators that have no type annotations. These obscure the function type, defeating many type analysis features.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUntypedClassDecorator": { "type": "string", "description": "Diagnostics for class decorators that have no type annotations. These obscure the class type, defeating many type analysis features.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUntypedBaseClass": { "type": "string", "description": "Diagnostics for base classes whose type cannot be determined statically. These obscure the class type, defeating many type analysis features.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUntypedNamedTuple": { "type": "string", "description": "Diagnostics when “namedtuple” is used rather than “NamedTuple”. The former contains no type information, whereas the latter does.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportPrivateUsage": { "type": "string", "description": "Diagnostics for incorrect usage of private or protected variables or functions. Protected class members begin with a single underscore _ and can be accessed only by subclasses. Private class members begin with a double underscore but do not end in a double underscore and can be accessed only within the declaring class. Variables and functions declared outside of a class are considered private if their names start with either a single or double underscore, and they cannot be accessed outside of the declaring module.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportConstantRedefinition": { "type": "string", "description": "Diagnostics for attempts to redefine variables whose names are all-caps with underscores and numerals.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportIncompatibleMethodOverride": { "type": "string", "description": "Diagnostics for methods that override a method of the same name in a base class in an incompatible manner (wrong number of parameters, incompatible parameter types, or incompatible return type).", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportIncompatibleVariableOverride": { "type": "string", "description": "Diagnostics for overrides in subclasses that redefine a variable in an incompatible way.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportOverlappingOverload": { "type": "string", "description": "Diagnostics for function overloads that overlap in signature and obscure each other or have incompatible return types.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportUninitializedInstanceVariable": { "type": "string", "description": "Diagnostics for instance variables that are not declared or initialized within class body or `__init__` method.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportInvalidStringEscapeSequence": { "type": "string", "description": "Diagnostics for invalid escape sequences used within string literals. The Python specification indicates that such sequences will generate a syntax error in future versions.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnknownParameterType": { "type": "string", "description": "Diagnostics for input or return parameters for functions or methods that have an unknown type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnknownArgumentType": { "type": "string", "description": "Diagnostics for call arguments for functions or methods that have an unknown type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnknownLambdaType": { "type": "string", "description": "Diagnostics for input or return parameters for lambdas that have an unknown type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnknownVariableType": { "type": "string", "description": "Diagnostics for variables that have an unknown type..", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnknownMemberType": { "type": "string", "description": "Diagnostics for class or instance variables that have an unknown type.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportMissingTypeArgument": { "type": "string", "description": "Diagnostics for generic class reference with missing type arguments.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportInvalidTypeVarUse": { "type": "string", "description": "Diagnostics for improper use of type variables in a function signature.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportCallInDefaultInitializer": { "type": "string", "description": "Diagnostics for function calls within a default value initialization expression. Such calls can mask expensive operations that are performed at module initialization time.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnnecessaryIsInstance": { "type": "string", "description": "Diagnostics for 'isinstance' or 'issubclass' calls where the result is statically determined to be always true or always false. Such calls are often indicative of a programming error.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnnecessaryCast": { "type": "string", "description": "Diagnostics for 'cast' calls that are statically determined to be unnecessary. Such calls are sometimes indicative of a programming error.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnnecessaryComparison": { "type": "string", "description": "Diagnostics for '==' and '!=' comparisons that are statically determined to be unnecessary. Such calls are sometimes indicative of a programming error.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportAssertAlwaysTrue": { "type": "string", "description": "Diagnostics for 'assert' statement that will provably always assert. This can be indicative of a programming error.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportSelfClsParameterName": { "type": "string", "description": "Diagnostics for a missing or misnamed “self” parameter in instance methods and “cls” parameter in class methods. Instance methods in metaclasses (classes that derive from “type”) are allowed to use “cls” for instance methods.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportImplicitStringConcatenation": { "type": "string", "description": "Diagnostics for two or more string literals that follow each other, indicating an implicit concatenation. This is considered a bad practice and often masks bugs such as missing commas.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportInvalidStubStatement": { "type": "string", "description": "Diagnostics for type stub statements that do not conform to PEP 484.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportIncompleteStub": { "type": "string", "description": "Diagnostics for the use of a module-level “__getattr__” function, indicating that the stub is incomplete.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportUndefinedVariable": { "type": "string", "description": "Diagnostics for a missing or misnamed “self” parameter in instance methods and “cls” parameter in class methods. Instance methods in metaclasses (classes that derive from “type”) are allowed to use “cls” for instance methods.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] }, "reportUnboundVariable": { "type": "string", "description": "Diagnostics for unbound and possibly unbound variables.", "default": "information", "enum": [ "none", "information", "warning", "error" ] }, "reportUnusedCallResult": { "type": "string", "description": "Diagnostics for call expressions whose results are not consumed and are not None.", "default": "none", "enum": [ "none", "information", "warning", "error" ] }, "reportUnusedCoroutine": { "type": "string", "description": "Diagnostics for call expressions that return a Coroutine and whose results are not consumed.", "default": "error", "enum": [ "none", "information", "warning", "error" ] }, "reportUnsupportedDunderAll": { "type": "string", "description": "Diagnostics for unsupported operations performed on __all__.", "default": "warning", "enum": [ "none", "information", "warning", "error" ] } } } } }, "jsonValidation": [ { "fileMatch": "pyrightconfig.json", "url": "./dist/schemas/pyrightconfig.schema.json" } ], "semanticTokenTypes": [ { "id": "module", "description": "module", "superType": "namespace" }, { "id": "intrinsic", "description": "intrinsic", "superType": "operator" }, { "id": "selfParameter", "description": "self parameter", "superType": "parameter" }, { "id": "clsParameter", "description": "cls parameter", "superType": "parameter" }, { "id": "magicFunction", "description": "magic aka dunder function", "superType": "function" } ], "semanticTokenModifiers": [ { "id": "typeHint", "description": "inside a type annotation" }, { "id": "typeHintComment", "description": "inside a comment style type annotation" }, { "id": "decorator", "description": "inside a decorator" }, { "id": "builtin", "description": "built-in identifier" } ], "semanticTokenScopes": [ { "language": "python", "scopes": { "selfParameter": [ "variable.parameter.function.language.special.self.python" ], "clsParameter": [ "variable.parameter.function.language.special.cls.python" ], "magicFunction": [ "support.function.magic.python" ], "*.typeHintComment": [ "comment.typehint.type.notation.python" ], "function.decorator": [ "meta.function.decorator.python" ], "class.decorator": [ "meta.function.decorator.python" ] } } ] }, "scripts": { "clean": "shx rm -rf ./dist ./out", "package": "vsce package --githubBranch main", "vscode:prepublish": "npm run clean && webpack --mode production --progress", "webpack": "webpack --mode development --progress", "webpack-dev": "npm run clean && webpack --mode development --watch --progress", "build:tests": "tsc", "test": "npm run build:tests && node ./src/tests/runTests.js" }, "devDependencies": { "@types/copy-webpack-plugin": "^8.0.1", "@types/jest": "^26.0.24", "@types/node": "^12.20.16", "@types/source-map-support": "^0.5.4", "@types/terser-webpack-plugin": "^5.0.4", "@types/vscode": "~1.57.0", "@vscode/test-electron": "^1.6.1", "copy-webpack-plugin": "^9.0.1", "javascript-obfuscator": "^2.15.6", "jest": "^27.0.6", "jest-cli": "^27.0.6", "jest-environment-node": "^27.0.6", "jest-extended": "^0.11.5", "jest-junit": "^12.2.0", "shx": "^0.3.3", "source-map-support": "^0.5.19", "ts-jest": "^27.0.3", "ts-loader": "^9.2.3", "ts-mockito": "^2.6.1", "typescript": "~4.3.5", "vsce": "^1.95.1", "webpack": "^5.44.0", "webpack-cli": "^4.7.2", "webpack-obfuscator": "^3.3.2" }, "dependencies": { "vscode-languageserver-types": "3.16.0", "@azure/storage-blob": "^12.6.0", "semver": "^7.3.5" }, "__metadata": { "id": "364d2426-116a-433a-a5d8-a5098dc3afbd", "publisherId": "998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8", "publisherDisplayName": "Microsoft", "installedTimestamp": 1628272082508 } }