@zzzen/pyright-internal 1.1.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer/aliasDeclarationUtils.d.ts +9 -0
- package/dist/analyzer/aliasDeclarationUtils.js +128 -0
- package/dist/analyzer/aliasDeclarationUtils.js.map +1 -0
- package/dist/analyzer/analysis.d.ts +18 -0
- package/dist/analyzer/analysis.js +81 -0
- package/dist/analyzer/analysis.js.map +1 -0
- package/dist/analyzer/analyzerFileInfo.d.ts +39 -0
- package/dist/analyzer/analyzerFileInfo.js +17 -0
- package/dist/analyzer/analyzerFileInfo.js.map +1 -0
- package/dist/analyzer/analyzerNodeInfo.d.ts +32 -0
- package/dist/analyzer/analyzerNodeInfo.js +138 -0
- package/dist/analyzer/analyzerNodeInfo.js.map +1 -0
- package/dist/analyzer/backgroundAnalysisProgram.d.ts +54 -0
- package/dist/analyzer/backgroundAnalysisProgram.js +222 -0
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -0
- package/dist/analyzer/binder.d.ts +149 -0
- package/dist/analyzer/binder.js +3195 -0
- package/dist/analyzer/binder.js.map +1 -0
- package/dist/analyzer/checker.d.ts +116 -0
- package/dist/analyzer/checker.js +3828 -0
- package/dist/analyzer/checker.js.map +1 -0
- package/dist/analyzer/circularDependency.d.ts +7 -0
- package/dist/analyzer/circularDependency.js +51 -0
- package/dist/analyzer/circularDependency.js.map +1 -0
- package/dist/analyzer/codeFlowEngine.d.ts +21 -0
- package/dist/analyzer/codeFlowEngine.js +1132 -0
- package/dist/analyzer/codeFlowEngine.js.map +1 -0
- package/dist/analyzer/codeFlowTypes.d.ts +82 -0
- package/dist/analyzer/codeFlowTypes.js +134 -0
- package/dist/analyzer/codeFlowTypes.js.map +1 -0
- package/dist/analyzer/codeFlowUtils.d.ts +2 -0
- package/dist/analyzer/codeFlowUtils.js +348 -0
- package/dist/analyzer/codeFlowUtils.js.map +1 -0
- package/dist/analyzer/commentUtils.d.ts +4 -0
- package/dist/analyzer/commentUtils.js +131 -0
- package/dist/analyzer/commentUtils.js.map +1 -0
- package/dist/analyzer/constraintSolver.d.ts +7 -0
- package/dist/analyzer/constraintSolver.js +605 -0
- package/dist/analyzer/constraintSolver.js.map +1 -0
- package/dist/analyzer/constructorTransform.d.ts +4 -0
- package/dist/analyzer/constructorTransform.js +219 -0
- package/dist/analyzer/constructorTransform.js.map +1 -0
- package/dist/analyzer/dataClasses.d.ts +9 -0
- package/dist/analyzer/dataClasses.js +762 -0
- package/dist/analyzer/dataClasses.js.map +1 -0
- package/dist/analyzer/declaration.d.ts +90 -0
- package/dist/analyzer/declaration.js +42 -0
- package/dist/analyzer/declaration.js.map +1 -0
- package/dist/analyzer/declarationUtils.d.ts +12 -0
- package/dist/analyzer/declarationUtils.js +212 -0
- package/dist/analyzer/declarationUtils.js.map +1 -0
- package/dist/analyzer/docStringConversion.d.ts +2 -0
- package/dist/analyzer/docStringConversion.js +699 -0
- package/dist/analyzer/docStringConversion.js.map +1 -0
- package/dist/analyzer/docStringUtils.d.ts +3 -0
- package/dist/analyzer/docStringUtils.js +103 -0
- package/dist/analyzer/docStringUtils.js.map +1 -0
- package/dist/analyzer/functionTransform.d.ts +4 -0
- package/dist/analyzer/functionTransform.js +96 -0
- package/dist/analyzer/functionTransform.js.map +1 -0
- package/dist/analyzer/importResolver.d.ts +97 -0
- package/dist/analyzer/importResolver.js +1617 -0
- package/dist/analyzer/importResolver.js.map +1 -0
- package/dist/analyzer/importResult.d.ts +33 -0
- package/dist/analyzer/importResult.js +11 -0
- package/dist/analyzer/importResult.js.map +1 -0
- package/dist/analyzer/importStatementUtils.d.ts +46 -0
- package/dist/analyzer/importStatementUtils.js +618 -0
- package/dist/analyzer/importStatementUtils.js.map +1 -0
- package/dist/analyzer/namedTuples.d.ts +5 -0
- package/dist/analyzer/namedTuples.js +342 -0
- package/dist/analyzer/namedTuples.js.map +1 -0
- package/dist/analyzer/packageTypeReport.d.ts +52 -0
- package/dist/analyzer/packageTypeReport.js +45 -0
- package/dist/analyzer/packageTypeReport.js.map +1 -0
- package/dist/analyzer/packageTypeVerifier.d.ts +37 -0
- package/dist/analyzer/packageTypeVerifier.js +908 -0
- package/dist/analyzer/packageTypeVerifier.js.map +1 -0
- package/dist/analyzer/parentDirectoryCache.d.ts +23 -0
- package/dist/analyzer/parentDirectoryCache.js +71 -0
- package/dist/analyzer/parentDirectoryCache.js.map +1 -0
- package/dist/analyzer/parseTreeCleaner.d.ts +8 -0
- package/dist/analyzer/parseTreeCleaner.js +51 -0
- package/dist/analyzer/parseTreeCleaner.js.map +1 -0
- package/dist/analyzer/parseTreeUtils.d.ts +98 -0
- package/dist/analyzer/parseTreeUtils.js +1753 -0
- package/dist/analyzer/parseTreeUtils.js.map +1 -0
- package/dist/analyzer/parseTreeWalker.d.ts +81 -0
- package/dist/analyzer/parseTreeWalker.js +437 -0
- package/dist/analyzer/parseTreeWalker.js.map +1 -0
- package/dist/analyzer/patternMatching.d.ts +6 -0
- package/dist/analyzer/patternMatching.js +866 -0
- package/dist/analyzer/patternMatching.js.map +1 -0
- package/dist/analyzer/program.d.ts +158 -0
- package/dist/analyzer/program.js +1902 -0
- package/dist/analyzer/program.js.map +1 -0
- package/dist/analyzer/properties.d.ts +10 -0
- package/dist/analyzer/properties.js +368 -0
- package/dist/analyzer/properties.js.map +1 -0
- package/dist/analyzer/protocols.d.ts +8 -0
- package/dist/analyzer/protocols.js +409 -0
- package/dist/analyzer/protocols.js.map +1 -0
- package/dist/analyzer/pyTypedUtils.d.ts +6 -0
- package/dist/analyzer/pyTypedUtils.js +42 -0
- package/dist/analyzer/pyTypedUtils.js.map +1 -0
- package/dist/analyzer/pythonPathUtils.d.ts +14 -0
- package/dist/analyzer/pythonPathUtils.js +173 -0
- package/dist/analyzer/pythonPathUtils.js.map +1 -0
- package/dist/analyzer/scope.d.ts +39 -0
- package/dist/analyzer/scope.js +110 -0
- package/dist/analyzer/scope.js.map +1 -0
- package/dist/analyzer/scopeUtils.d.ts +6 -0
- package/dist/analyzer/scopeUtils.js +72 -0
- package/dist/analyzer/scopeUtils.js.map +1 -0
- package/dist/analyzer/service.d.ts +144 -0
- package/dist/analyzer/service.js +1197 -0
- package/dist/analyzer/service.js.map +1 -0
- package/dist/analyzer/sourceFile.d.ts +123 -0
- package/dist/analyzer/sourceFile.js +908 -0
- package/dist/analyzer/sourceFile.js.map +1 -0
- package/dist/analyzer/sourceMapper.d.ts +47 -0
- package/dist/analyzer/sourceMapper.js +543 -0
- package/dist/analyzer/sourceMapper.js.map +1 -0
- package/dist/analyzer/staticExpressions.d.ts +4 -0
- package/dist/analyzer/staticExpressions.js +242 -0
- package/dist/analyzer/staticExpressions.js.map +1 -0
- package/dist/analyzer/symbol.d.ts +50 -0
- package/dist/analyzer/symbol.js +160 -0
- package/dist/analyzer/symbol.js.map +1 -0
- package/dist/analyzer/symbolNameUtils.d.ts +8 -0
- package/dist/analyzer/symbolNameUtils.js +53 -0
- package/dist/analyzer/symbolNameUtils.js.map +1 -0
- package/dist/analyzer/symbolUtils.d.ts +7 -0
- package/dist/analyzer/symbolUtils.js +46 -0
- package/dist/analyzer/symbolUtils.js.map +1 -0
- package/dist/analyzer/testWalker.d.ts +14 -0
- package/dist/analyzer/testWalker.js +92 -0
- package/dist/analyzer/testWalker.js.map +1 -0
- package/dist/analyzer/tracePrinter.d.ts +11 -0
- package/dist/analyzer/tracePrinter.js +222 -0
- package/dist/analyzer/tracePrinter.js.map +1 -0
- package/dist/analyzer/typeCache.d.ts +40 -0
- package/dist/analyzer/typeCache.js +134 -0
- package/dist/analyzer/typeCache.js.map +1 -0
- package/dist/analyzer/typeDocStringUtils.d.ts +12 -0
- package/dist/analyzer/typeDocStringUtils.js +293 -0
- package/dist/analyzer/typeDocStringUtils.js.map +1 -0
- package/dist/analyzer/typeEvaluator.d.ts +18 -0
- package/dist/analyzer/typeEvaluator.js +16598 -0
- package/dist/analyzer/typeEvaluator.js.map +1 -0
- package/dist/analyzer/typeEvaluatorTypes.d.ts +220 -0
- package/dist/analyzer/typeEvaluatorTypes.js +16 -0
- package/dist/analyzer/typeEvaluatorTypes.js.map +1 -0
- package/dist/analyzer/typeEvaluatorWithTracker.d.ts +6 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js +121 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -0
- package/dist/analyzer/typeGuards.d.ts +6 -0
- package/dist/analyzer/typeGuards.js +1293 -0
- package/dist/analyzer/typeGuards.js.map +1 -0
- package/dist/analyzer/typePrinter.d.ts +17 -0
- package/dist/analyzer/typePrinter.js +603 -0
- package/dist/analyzer/typePrinter.js.map +1 -0
- package/dist/analyzer/typeStubWriter.d.ts +48 -0
- package/dist/analyzer/typeStubWriter.js +605 -0
- package/dist/analyzer/typeStubWriter.js.map +1 -0
- package/dist/analyzer/typeUtils.d.ts +134 -0
- package/dist/analyzer/typeUtils.js +2380 -0
- package/dist/analyzer/typeUtils.js.map +1 -0
- package/dist/analyzer/typeVarContext.d.ts +50 -0
- package/dist/analyzer/typeVarContext.js +250 -0
- package/dist/analyzer/typeVarContext.js.map +1 -0
- package/dist/analyzer/typedDicts.d.ts +12 -0
- package/dist/analyzer/typedDicts.js +695 -0
- package/dist/analyzer/typedDicts.js.map +1 -0
- package/dist/analyzer/types.d.ts +484 -0
- package/dist/analyzer/types.js +1844 -0
- package/dist/analyzer/types.js.map +1 -0
- package/dist/backgroundAnalysis.d.ts +14 -0
- package/dist/backgroundAnalysis.js +42 -0
- package/dist/backgroundAnalysis.js.map +1 -0
- package/dist/backgroundAnalysisBase.d.ts +83 -0
- package/dist/backgroundAnalysisBase.js +429 -0
- package/dist/backgroundAnalysisBase.js.map +1 -0
- package/dist/backgroundThreadBase.d.ts +34 -0
- package/dist/backgroundThreadBase.js +134 -0
- package/dist/backgroundThreadBase.js.map +1 -0
- package/dist/commands/commandController.d.ts +13 -0
- package/dist/commands/commandController.js +48 -0
- package/dist/commands/commandController.js.map +1 -0
- package/dist/commands/commandResult.d.ts +9 -0
- package/dist/commands/commandResult.js +19 -0
- package/dist/commands/commandResult.js.map +1 -0
- package/dist/commands/commands.d.ts +7 -0
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/commands/createTypeStub.d.ts +8 -0
- package/dist/commands/createTypeStub.js +50 -0
- package/dist/commands/createTypeStub.js.map +1 -0
- package/dist/commands/quickActionCommand.d.ts +8 -0
- package/dist/commands/quickActionCommand.js +31 -0
- package/dist/commands/quickActionCommand.js.map +1 -0
- package/dist/commands/restartServer.d.ts +8 -0
- package/dist/commands/restartServer.js +20 -0
- package/dist/commands/restartServer.js.map +1 -0
- package/dist/common/cancellationUtils.d.ts +16 -0
- package/dist/common/cancellationUtils.js +60 -0
- package/dist/common/cancellationUtils.js.map +1 -0
- package/dist/common/chokidarFileWatcherProvider.d.ts +9 -0
- package/dist/common/chokidarFileWatcherProvider.js +88 -0
- package/dist/common/chokidarFileWatcherProvider.js.map +1 -0
- package/dist/common/collectionUtils.d.ts +114 -0
- package/dist/common/collectionUtils.js +292 -0
- package/dist/common/collectionUtils.js.map +1 -0
- package/dist/common/commandLineOptions.d.ts +41 -0
- package/dist/common/commandLineOptions.js +46 -0
- package/dist/common/commandLineOptions.js.map +1 -0
- package/dist/common/configOptions.d.ts +144 -0
- package/dist/common/configOptions.js +908 -0
- package/dist/common/configOptions.js.map +1 -0
- package/dist/common/console.d.ts +61 -0
- package/dist/common/console.js +191 -0
- package/dist/common/console.js.map +1 -0
- package/dist/common/core.d.ts +67 -0
- package/dist/common/core.js +118 -0
- package/dist/common/core.js.map +1 -0
- package/dist/common/crypto.d.ts +1 -0
- package/dist/common/crypto.js +37 -0
- package/dist/common/crypto.js.map +1 -0
- package/dist/common/debug.d.ts +13 -0
- package/dist/common/debug.js +131 -0
- package/dist/common/debug.js.map +1 -0
- package/dist/common/deferred.d.ts +11 -0
- package/dist/common/deferred.js +62 -0
- package/dist/common/deferred.js.map +1 -0
- package/dist/common/diagnostic.d.ts +59 -0
- package/dist/common/diagnostic.js +134 -0
- package/dist/common/diagnostic.js.map +1 -0
- package/dist/common/diagnosticRules.d.ts +67 -0
- package/dist/common/diagnosticRules.js +83 -0
- package/dist/common/diagnosticRules.js.map +1 -0
- package/dist/common/diagnosticSink.d.ts +34 -0
- package/dist/common/diagnosticSink.js +110 -0
- package/dist/common/diagnosticSink.js.map +1 -0
- package/dist/common/editAction.d.ts +29 -0
- package/dist/common/editAction.js +11 -0
- package/dist/common/editAction.js.map +1 -0
- package/dist/common/extensibility.d.ts +11 -0
- package/dist/common/extensibility.js +10 -0
- package/dist/common/extensibility.js.map +1 -0
- package/dist/common/extensions.d.ts +3 -0
- package/dist/common/extensions.js +15 -0
- package/dist/common/extensions.js.map +1 -0
- package/dist/common/fileBasedCancellationUtils.d.ts +11 -0
- package/dist/common/fileBasedCancellationUtils.js +259 -0
- package/dist/common/fileBasedCancellationUtils.js.map +1 -0
- package/dist/common/fileSystem.d.ts +72 -0
- package/dist/common/fileSystem.js +69 -0
- package/dist/common/fileSystem.js.map +1 -0
- package/dist/common/fullAccessHost.d.ts +19 -0
- package/dist/common/fullAccessHost.js +193 -0
- package/dist/common/fullAccessHost.js.map +1 -0
- package/dist/common/host.d.ts +21 -0
- package/dist/common/host.js +30 -0
- package/dist/common/host.js.map +1 -0
- package/dist/common/logTracker.d.ts +15 -0
- package/dist/common/logTracker.js +129 -0
- package/dist/common/logTracker.js.map +1 -0
- package/dist/common/lspUtils.d.ts +3 -0
- package/dist/common/lspUtils.js +20 -0
- package/dist/common/lspUtils.js.map +1 -0
- package/dist/common/memUtils.d.ts +3 -0
- package/dist/common/memUtils.js +37 -0
- package/dist/common/memUtils.js.map +1 -0
- package/dist/common/pathConsts.d.ts +8 -0
- package/dist/common/pathConsts.js +19 -0
- package/dist/common/pathConsts.js.map +1 -0
- package/dist/common/pathUtils.d.ts +170 -0
- package/dist/common/pathUtils.js +762 -0
- package/dist/common/pathUtils.js.map +1 -0
- package/dist/common/positionUtils.d.ts +7 -0
- package/dist/common/positionUtils.js +71 -0
- package/dist/common/positionUtils.js.map +1 -0
- package/dist/common/progressReporter.d.ts +15 -0
- package/dist/common/progressReporter.js +44 -0
- package/dist/common/progressReporter.js.map +1 -0
- package/dist/common/pythonVersion.d.ts +20 -0
- package/dist/common/pythonVersion.js +71 -0
- package/dist/common/pythonVersion.js.map +1 -0
- package/dist/common/realFileSystem.d.ts +8 -0
- package/dist/common/realFileSystem.js +368 -0
- package/dist/common/realFileSystem.js.map +1 -0
- package/dist/common/stringUtils.d.ts +47 -0
- package/dist/common/stringUtils.js +160 -0
- package/dist/common/stringUtils.js.map +1 -0
- package/dist/common/textEditUtils.d.ts +3 -0
- package/dist/common/textEditUtils.js +29 -0
- package/dist/common/textEditUtils.js.map +1 -0
- package/dist/common/textRange.d.ts +47 -0
- package/dist/common/textRange.js +211 -0
- package/dist/common/textRange.js.map +1 -0
- package/dist/common/textRangeCollection.d.ts +13 -0
- package/dist/common/textRangeCollection.js +108 -0
- package/dist/common/textRangeCollection.js.map +1 -0
- package/dist/common/timing.d.ts +31 -0
- package/dist/common/timing.js +100 -0
- package/dist/common/timing.js.map +1 -0
- package/dist/common/uriParser.d.ts +12 -0
- package/dist/common/uriParser.js +25 -0
- package/dist/common/uriParser.js.map +1 -0
- package/dist/common/workspaceEditUtils.d.ts +7 -0
- package/dist/common/workspaceEditUtils.js +63 -0
- package/dist/common/workspaceEditUtils.js.map +1 -0
- package/dist/languageServerBase.d.ts +211 -0
- package/dist/languageServerBase.js +923 -0
- package/dist/languageServerBase.js.map +1 -0
- package/dist/languageService/analyzerServiceExecutor.d.ts +8 -0
- package/dist/languageService/analyzerServiceExecutor.js +97 -0
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -0
- package/dist/languageService/autoImporter.d.ts +84 -0
- package/dist/languageService/autoImporter.js +635 -0
- package/dist/languageService/autoImporter.js.map +1 -0
- package/dist/languageService/callHierarchyProvider.d.ts +12 -0
- package/dist/languageService/callHierarchyProvider.js +368 -0
- package/dist/languageService/callHierarchyProvider.js.map +1 -0
- package/dist/languageService/codeActionProvider.d.ts +6 -0
- package/dist/languageService/codeActionProvider.js +53 -0
- package/dist/languageService/codeActionProvider.js.map +1 -0
- package/dist/languageService/completionProvider.d.ts +147 -0
- package/dist/languageService/completionProvider.js +2220 -0
- package/dist/languageService/completionProvider.js.map +1 -0
- package/dist/languageService/definitionProvider.d.ts +17 -0
- package/dist/languageService/definitionProvider.js +206 -0
- package/dist/languageService/definitionProvider.js.map +1 -0
- package/dist/languageService/documentHighlightProvider.d.ts +7 -0
- package/dist/languageService/documentHighlightProvider.js +63 -0
- package/dist/languageService/documentHighlightProvider.js.map +1 -0
- package/dist/languageService/documentSymbolCollector.d.ts +37 -0
- package/dist/languageService/documentSymbolCollector.js +344 -0
- package/dist/languageService/documentSymbolCollector.js.map +1 -0
- package/dist/languageService/documentSymbolProvider.d.ts +37 -0
- package/dist/languageService/documentSymbolProvider.js +308 -0
- package/dist/languageService/documentSymbolProvider.js.map +1 -0
- package/dist/languageService/hoverProvider.d.ts +25 -0
- package/dist/languageService/hoverProvider.js +366 -0
- package/dist/languageService/hoverProvider.js.map +1 -0
- package/dist/languageService/importAdder.d.ts +24 -0
- package/dist/languageService/importAdder.js +296 -0
- package/dist/languageService/importAdder.js.map +1 -0
- package/dist/languageService/importSorter.d.ts +15 -0
- package/dist/languageService/importSorter.js +152 -0
- package/dist/languageService/importSorter.js.map +1 -0
- package/dist/languageService/indentationUtils.d.ts +4 -0
- package/dist/languageService/indentationUtils.js +597 -0
- package/dist/languageService/indentationUtils.js.map +1 -0
- package/dist/languageService/quickActions.d.ts +4 -0
- package/dist/languageService/quickActions.js +97 -0
- package/dist/languageService/quickActions.js.map +1 -0
- package/dist/languageService/referencesProvider.d.ts +36 -0
- package/dist/languageService/referencesProvider.js +236 -0
- package/dist/languageService/referencesProvider.js.map +1 -0
- package/dist/languageService/renameModuleProvider.d.ts +58 -0
- package/dist/languageService/renameModuleProvider.js +884 -0
- package/dist/languageService/renameModuleProvider.js.map +1 -0
- package/dist/languageService/signatureHelpProvider.d.ts +26 -0
- package/dist/languageService/signatureHelpProvider.js +180 -0
- package/dist/languageService/signatureHelpProvider.js.map +1 -0
- package/dist/languageService/tooltipUtils.d.ts +9 -0
- package/dist/languageService/tooltipUtils.js +129 -0
- package/dist/languageService/tooltipUtils.js.map +1 -0
- package/dist/localization/localize.d.ts +1324 -0
- package/dist/localization/localize.js +788 -0
- package/dist/localization/localize.js.map +1 -0
- package/dist/localization/package.nls.de.json +1 -0
- package/dist/localization/package.nls.en-us.json +636 -0
- package/dist/localization/package.nls.es.json +1 -0
- package/dist/localization/package.nls.fr.json +1 -0
- package/dist/localization/package.nls.ja.json +1 -0
- package/dist/localization/package.nls.ru.json +1 -0
- package/dist/localization/package.nls.zh-cn.json +1 -0
- package/dist/localization/package.nls.zh-tw.json +1 -0
- package/dist/nodeMain.d.ts +1 -0
- package/dist/nodeMain.js +21 -0
- package/dist/nodeMain.js.map +1 -0
- package/dist/nodeServer.d.ts +3 -0
- package/dist/nodeServer.js +31 -0
- package/dist/nodeServer.js.map +1 -0
- package/dist/parser/characterStream.d.ts +27 -0
- package/dist/parser/characterStream.js +120 -0
- package/dist/parser/characterStream.js.map +1 -0
- package/dist/parser/characters.d.ts +17 -0
- package/dist/parser/characters.js +240 -0
- package/dist/parser/characters.js.map +1 -0
- package/dist/parser/parseNodes.d.ts +750 -0
- package/dist/parser/parseNodes.js +1406 -0
- package/dist/parser/parseNodes.js.map +1 -0
- package/dist/parser/parser.d.ts +191 -0
- package/dist/parser/parser.js +3806 -0
- package/dist/parser/parser.js.map +1 -0
- package/dist/parser/stringTokenUtils.d.ts +25 -0
- package/dist/parser/stringTokenUtils.js +455 -0
- package/dist/parser/stringTokenUtils.js.map +1 -0
- package/dist/parser/tokenizer.d.ts +71 -0
- package/dist/parser/tokenizer.js +1111 -0
- package/dist/parser/tokenizer.js.map +1 -0
- package/dist/parser/tokenizerTypes.d.ts +223 -0
- package/dist/parser/tokenizerTypes.js +164 -0
- package/dist/parser/tokenizerTypes.js.map +1 -0
- package/dist/parser/unicode.d.ts +23 -0
- package/dist/parser/unicode.js +2899 -0
- package/dist/parser/unicode.js.map +1 -0
- package/dist/pyright.d.ts +1 -0
- package/dist/pyright.js +645 -0
- package/dist/pyright.js.map +1 -0
- package/dist/pyrightFileSystem.d.ts +28 -0
- package/dist/pyrightFileSystem.js +196 -0
- package/dist/pyrightFileSystem.js.map +1 -0
- package/dist/readonlyAugmentedFileSystem.d.ts +40 -0
- package/dist/readonlyAugmentedFileSystem.js +155 -0
- package/dist/readonlyAugmentedFileSystem.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +232 -0
- package/dist/server.js.map +1 -0
- package/dist/tests/chainedSourceFiles.test.d.ts +1 -0
- package/dist/tests/chainedSourceFiles.test.js +153 -0
- package/dist/tests/chainedSourceFiles.test.js.map +1 -0
- package/dist/tests/checker.test.d.ts +1 -0
- package/dist/tests/checker.test.js +346 -0
- package/dist/tests/checker.test.js.map +1 -0
- package/dist/tests/collectionUtils.test.d.ts +1 -0
- package/dist/tests/collectionUtils.test.js +153 -0
- package/dist/tests/collectionUtils.test.js.map +1 -0
- package/dist/tests/common.test.d.ts +1 -0
- package/dist/tests/common.test.js +125 -0
- package/dist/tests/common.test.js.map +1 -0
- package/dist/tests/config.test.d.ts +1 -0
- package/dist/tests/config.test.js +230 -0
- package/dist/tests/config.test.js.map +1 -0
- package/dist/tests/debug.test.d.ts +1 -0
- package/dist/tests/debug.test.js +102 -0
- package/dist/tests/debug.test.js.map +1 -0
- package/dist/tests/deferred.test.d.ts +1 -0
- package/dist/tests/deferred.test.js +65 -0
- package/dist/tests/deferred.test.js.map +1 -0
- package/dist/tests/diagnosticOverrides.test.d.ts +1 -0
- package/dist/tests/diagnosticOverrides.test.js +108 -0
- package/dist/tests/diagnosticOverrides.test.js.map +1 -0
- package/dist/tests/docStringConversion.test.d.ts +1 -0
- package/dist/tests/docStringConversion.test.js +695 -0
- package/dist/tests/docStringConversion.test.js.map +1 -0
- package/dist/tests/docStringUtils.test.d.ts +1 -0
- package/dist/tests/docStringUtils.test.js +70 -0
- package/dist/tests/docStringUtils.test.js.map +1 -0
- package/dist/tests/documentSymbolCollector.test.d.ts +1 -0
- package/dist/tests/documentSymbolCollector.test.js +635 -0
- package/dist/tests/documentSymbolCollector.test.js.map +1 -0
- package/dist/tests/filesystem.test.d.ts +1 -0
- package/dist/tests/filesystem.test.js +194 -0
- package/dist/tests/filesystem.test.js.map +1 -0
- package/dist/tests/fourSlashParser.test.d.ts +1 -0
- package/dist/tests/fourSlashParser.test.js +281 -0
- package/dist/tests/fourSlashParser.test.js.map +1 -0
- package/dist/tests/fourSlashRunner.test.d.ts +1 -0
- package/dist/tests/fourSlashRunner.test.js +52 -0
- package/dist/tests/fourSlashRunner.test.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js +42 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js +13 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js +35 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js +128 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +116 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js +21 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js +245 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js +162 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js +132 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js +18 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js +36 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js +147 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js +131 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js +73 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js +58 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js +154 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js +143 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js +44 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fourslash.js +51 -0
- package/dist/tests/fourslash/completions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js +96 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.d.ts +0 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.included.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +49 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js +101 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js +105 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js +67 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +75 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js +17 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js +57 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js +49 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js +60 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js +63 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js +34 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.js +61 -0
- package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.js +28 -0
- package/dist/tests/fourslash/completions.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js +64 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js +78 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js +9 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js +33 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.js +25 -0
- package/dist/tests/fourslash/completions.with.fourslash.js.map +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js +64 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js +93 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js +19 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js +123 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js +42 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +34 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js +213 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js +29 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js +30 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js +28 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js +33 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js +94 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js +106 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js +66 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js +26 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js +36 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js +46 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js +60 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js +54 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js +41 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js +83 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js +32 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js +29 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js +33 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js +36 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js +44 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js +31 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/fourslash.d.ts +301 -0
- package/dist/tests/fourslash/fourslash.js +25 -0
- package/dist/tests/fourslash/fourslash.js.map +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js +30 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +63 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js +47 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +77 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +21 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +25 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +18 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js +12 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js +24 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js +23 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.js +10 -0
- package/dist/tests/fourslash/hover.import.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +61 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +51 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +40 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +43 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +44 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js +84 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js +88 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +49 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js +50 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js +35 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +73 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js +63 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js +72 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js +61 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js +24 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js.map +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js +13 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js +18 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js +13 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js +31 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js +44 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js +18 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js +34 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.js +9 -0
- package/dist/tests/fourslash/noerrors.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js +17 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js +21 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.library.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js +29 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +2 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js +19 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js +33 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js +39 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.js +25 -0
- package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js +62 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js +97 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js +22 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js +42 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js +49 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js +115 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js +63 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js +104 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashParser.d.ts +10 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js +347 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.d.ts +81 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js +65 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -0
- package/dist/tests/harness/fourslash/runner.d.ts +20 -0
- package/dist/tests/harness/fourslash/runner.js +93 -0
- package/dist/tests/harness/fourslash/runner.js.map +1 -0
- package/dist/tests/harness/fourslash/testLanguageService.d.ts +40 -0
- package/dist/tests/harness/fourslash/testLanguageService.js +120 -0
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.Consts.d.ts +11 -0
- package/dist/tests/harness/fourslash/testState.Consts.js +50 -0
- package/dist/tests/harness/fourslash/testState.Consts.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.d.ts +232 -0
- package/dist/tests/harness/fourslash/testState.js +1381 -0
- package/dist/tests/harness/fourslash/testState.js.map +1 -0
- package/dist/tests/harness/testAccessHost.d.ts +8 -0
- package/dist/tests/harness/testAccessHost.js +26 -0
- package/dist/tests/harness/testAccessHost.js.map +1 -0
- package/dist/tests/harness/testHost.d.ts +16 -0
- package/dist/tests/harness/testHost.js +161 -0
- package/dist/tests/harness/testHost.js.map +1 -0
- package/dist/tests/harness/utils.d.ts +74 -0
- package/dist/tests/harness/utils.js +328 -0
- package/dist/tests/harness/utils.js.map +1 -0
- package/dist/tests/harness/vfs/factory.d.ts +32 -0
- package/dist/tests/harness/vfs/factory.js +173 -0
- package/dist/tests/harness/vfs/factory.js.map +1 -0
- package/dist/tests/harness/vfs/filesystem.d.ts +430 -0
- package/dist/tests/harness/vfs/filesystem.js +1455 -0
- package/dist/tests/harness/vfs/filesystem.js.map +1 -0
- package/dist/tests/harness/vfs/pathValidation.d.ts +24 -0
- package/dist/tests/harness/vfs/pathValidation.js +123 -0
- package/dist/tests/harness/vfs/pathValidation.js.map +1 -0
- package/dist/tests/importAdder.test.d.ts +1 -0
- package/dist/tests/importAdder.test.js +1192 -0
- package/dist/tests/importAdder.test.js.map +1 -0
- package/dist/tests/importResolver.test.d.ts +1 -0
- package/dist/tests/importResolver.test.js +450 -0
- package/dist/tests/importResolver.test.js.map +1 -0
- package/dist/tests/importStatementUtils.test.d.ts +1 -0
- package/dist/tests/importStatementUtils.test.js +371 -0
- package/dist/tests/importStatementUtils.test.js.map +1 -0
- package/dist/tests/indentationUtils.ptvs.test.d.ts +1 -0
- package/dist/tests/indentationUtils.ptvs.test.js +324 -0
- package/dist/tests/indentationUtils.ptvs.test.js.map +1 -0
- package/dist/tests/indentationUtils.reindent.test.d.ts +1 -0
- package/dist/tests/indentationUtils.reindent.test.js +332 -0
- package/dist/tests/indentationUtils.reindent.test.js.map +1 -0
- package/dist/tests/indentationUtils.test.d.ts +1 -0
- package/dist/tests/indentationUtils.test.js +375 -0
- package/dist/tests/indentationUtils.test.js.map +1 -0
- package/dist/tests/ipythonMode.test.d.ts +1 -0
- package/dist/tests/ipythonMode.test.js +303 -0
- package/dist/tests/ipythonMode.test.js.map +1 -0
- package/dist/tests/localizer.test.d.ts +1 -0
- package/dist/tests/localizer.test.js +64 -0
- package/dist/tests/localizer.test.js.map +1 -0
- package/dist/tests/parseTreeUtils.test.d.ts +1 -0
- package/dist/tests/parseTreeUtils.test.js +228 -0
- package/dist/tests/parseTreeUtils.test.js.map +1 -0
- package/dist/tests/parser.test.d.ts +1 -0
- package/dist/tests/parser.test.js +101 -0
- package/dist/tests/parser.test.js.map +1 -0
- package/dist/tests/pathUtils.test.d.ts +1 -0
- package/dist/tests/pathUtils.test.js +253 -0
- package/dist/tests/pathUtils.test.js.map +1 -0
- package/dist/tests/pyrightFileSystem.test.d.ts +1 -0
- package/dist/tests/pyrightFileSystem.test.js +152 -0
- package/dist/tests/pyrightFileSystem.test.js.map +1 -0
- package/dist/tests/renameModule.folder.test.d.ts +1 -0
- package/dist/tests/renameModule.folder.test.js +229 -0
- package/dist/tests/renameModule.folder.test.js.map +1 -0
- package/dist/tests/renameModule.fromImports.test.d.ts +1 -0
- package/dist/tests/renameModule.fromImports.test.js +790 -0
- package/dist/tests/renameModule.fromImports.test.js.map +1 -0
- package/dist/tests/renameModule.imports.test.d.ts +1 -0
- package/dist/tests/renameModule.imports.test.js +380 -0
- package/dist/tests/renameModule.imports.test.js.map +1 -0
- package/dist/tests/renameModule.misc.test.d.ts +1 -0
- package/dist/tests/renameModule.misc.test.js +615 -0
- package/dist/tests/renameModule.misc.test.js.map +1 -0
- package/dist/tests/renameModule.relativePath.test.d.ts +1 -0
- package/dist/tests/renameModule.relativePath.test.js +231 -0
- package/dist/tests/renameModule.relativePath.test.js.map +1 -0
- package/dist/tests/renameModuleTestUtils.d.ts +4 -0
- package/dist/tests/renameModuleTestUtils.js +148 -0
- package/dist/tests/renameModuleTestUtils.js.map +1 -0
- package/dist/tests/sourceFile.test.d.ts +1 -0
- package/dist/tests/sourceFile.test.js +25 -0
- package/dist/tests/sourceFile.test.js.map +1 -0
- package/dist/tests/stringUtils.test.d.ts +1 -0
- package/dist/tests/stringUtils.test.js +69 -0
- package/dist/tests/stringUtils.test.js.map +1 -0
- package/dist/tests/symbolNameUtils.test.d.ts +1 -0
- package/dist/tests/symbolNameUtils.test.js +83 -0
- package/dist/tests/symbolNameUtils.test.js.map +1 -0
- package/dist/tests/testState.test.d.ts +1 -0
- package/dist/tests/testState.test.js +521 -0
- package/dist/tests/testState.test.js.map +1 -0
- package/dist/tests/testUtils.d.ts +27 -0
- package/dist/tests/testUtils.js +213 -0
- package/dist/tests/testUtils.js.map +1 -0
- package/dist/tests/tokenizer.test.d.ts +1 -0
- package/dist/tests/tokenizer.test.js +1277 -0
- package/dist/tests/tokenizer.test.js.map +1 -0
- package/dist/tests/typeEvaluator1.test.d.ts +1 -0
- package/dist/tests/typeEvaluator1.test.js +1023 -0
- package/dist/tests/typeEvaluator1.test.js.map +1 -0
- package/dist/tests/typeEvaluator2.test.d.ts +1 -0
- package/dist/tests/typeEvaluator2.test.js +869 -0
- package/dist/tests/typeEvaluator2.test.js.map +1 -0
- package/dist/tests/typeEvaluator3.test.d.ts +1 -0
- package/dist/tests/typeEvaluator3.test.js +915 -0
- package/dist/tests/typeEvaluator3.test.js.map +1 -0
- package/dist/tests/typeEvaluator4.test.d.ts +1 -0
- package/dist/tests/typeEvaluator4.test.js +901 -0
- package/dist/tests/typeEvaluator4.test.js.map +1 -0
- package/dist/tests/updateSymbolReference.test.d.ts +1 -0
- package/dist/tests/updateSymbolReference.test.js +980 -0
- package/dist/tests/updateSymbolReference.test.js.map +1 -0
- package/dist/tests/zipfs.test.d.ts +1 -0
- package/dist/tests/zipfs.test.js +112 -0
- package/dist/tests/zipfs.test.js.map +1 -0
- package/dist/workspaceMap.d.ts +6 -0
- package/dist/workspaceMap.js +73 -0
- package/dist/workspaceMap.js.map +1 -0
- package/package.json +45 -0
@@ -0,0 +1,762 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* dataClasses.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
* Author: Eric Traut
|
7
|
+
*
|
8
|
+
* Provides special-case logic for the construction of dataclass
|
9
|
+
* classes and dataclass transform.
|
10
|
+
*/
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
12
|
+
if (k2 === undefined) k2 = k;
|
13
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
14
|
+
}) : (function(o, m, k, k2) {
|
15
|
+
if (k2 === undefined) k2 = k;
|
16
|
+
o[k2] = m[k];
|
17
|
+
}));
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
20
|
+
}) : function(o, v) {
|
21
|
+
o["default"] = v;
|
22
|
+
});
|
23
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
24
|
+
if (mod && mod.__esModule) return mod;
|
25
|
+
var result = {};
|
26
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
27
|
+
__setModuleDefault(result, mod);
|
28
|
+
return result;
|
29
|
+
};
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
31
|
+
exports.applyDataClassDecorator = exports.applyDataClassDefaultBehaviors = exports.applyDataClassClassBehaviorOverrides = exports.getDataclassDecoratorBehaviors = exports.validateDataClassTransformDecorator = exports.synthesizeDataClassMethods = void 0;
|
32
|
+
const debug_1 = require("../common/debug");
|
33
|
+
const diagnosticRules_1 = require("../common/diagnosticRules");
|
34
|
+
const localize_1 = require("../localization/localize");
|
35
|
+
const AnalyzerNodeInfo = __importStar(require("./analyzerNodeInfo"));
|
36
|
+
const namedTuples_1 = require("./namedTuples");
|
37
|
+
const staticExpressions_1 = require("./staticExpressions");
|
38
|
+
const symbol_1 = require("./symbol");
|
39
|
+
const symbolUtils_1 = require("./symbolUtils");
|
40
|
+
const types_1 = require("./types");
|
41
|
+
const typeUtils_1 = require("./typeUtils");
|
42
|
+
const typeVarContext_1 = require("./typeVarContext");
|
43
|
+
// Validates fields for compatibility with a dataclass and synthesizes
|
44
|
+
// an appropriate __new__ and __init__ methods plus __dataclass_fields__
|
45
|
+
// and __match_args__ class variables.
|
46
|
+
function synthesizeDataClassMethods(evaluator, node, classType, skipSynthesizeInit, hasExistingInitMethod, skipSynthesizeHash) {
|
47
|
+
(0, debug_1.assert)(types_1.ClassType.isDataClass(classType));
|
48
|
+
const classTypeVar = (0, typeUtils_1.synthesizeTypeVarForSelfCls)(classType, /* isClsParam */ true);
|
49
|
+
const newType = types_1.FunctionType.createSynthesizedInstance('__new__', 1 /* ConstructorMethod */);
|
50
|
+
const initType = types_1.FunctionType.createSynthesizedInstance('__init__');
|
51
|
+
types_1.FunctionType.addParameter(newType, {
|
52
|
+
category: 0 /* Simple */,
|
53
|
+
name: 'cls',
|
54
|
+
type: classTypeVar,
|
55
|
+
hasDeclaredType: true,
|
56
|
+
});
|
57
|
+
types_1.FunctionType.addDefaultParameters(newType);
|
58
|
+
newType.details.declaredReturnType = (0, typeUtils_1.convertToInstance)(classTypeVar);
|
59
|
+
const selfParam = {
|
60
|
+
category: 0 /* Simple */,
|
61
|
+
name: 'self',
|
62
|
+
type: (0, typeUtils_1.synthesizeTypeVarForSelfCls)(classType, /* isClsParam */ false),
|
63
|
+
hasDeclaredType: true,
|
64
|
+
};
|
65
|
+
types_1.FunctionType.addParameter(initType, selfParam);
|
66
|
+
initType.details.declaredReturnType = types_1.NoneType.createInstance();
|
67
|
+
// Maintain a list of all dataclass entries (including
|
68
|
+
// those from inherited classes) plus a list of only those
|
69
|
+
// entries added by this class.
|
70
|
+
const localDataClassEntries = [];
|
71
|
+
const fullDataClassEntries = [];
|
72
|
+
const allAncestorsKnown = addInheritedDataClassEntries(classType, fullDataClassEntries);
|
73
|
+
if (!allAncestorsKnown) {
|
74
|
+
// If one or more ancestor classes have an unknown type, we cannot
|
75
|
+
// safely determine the parameter list, so we'll accept any parameters
|
76
|
+
// to avoid a false positive.
|
77
|
+
types_1.FunctionType.addDefaultParameters(initType);
|
78
|
+
}
|
79
|
+
const localEntryTypeEvaluator = [];
|
80
|
+
let sawKeywordOnlySeparator = false;
|
81
|
+
classType.details.fields.forEach((symbol) => {
|
82
|
+
var _a, _b, _c;
|
83
|
+
if (!symbol.isIgnoredForProtocolMatch()) {
|
84
|
+
// Only variables (not functions, classes, etc.) are considered.
|
85
|
+
const lastDecl = (0, symbolUtils_1.getLastTypedDeclaredForSymbol)(symbol);
|
86
|
+
if (lastDecl && lastDecl.type === 1 /* Variable */) {
|
87
|
+
let statement = lastDecl.node;
|
88
|
+
while (statement) {
|
89
|
+
if (statement.nodeType === 3 /* Assignment */) {
|
90
|
+
break;
|
91
|
+
}
|
92
|
+
if (statement.nodeType === 54 /* TypeAnnotation */) {
|
93
|
+
if (((_a = statement.parent) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* Assignment */) {
|
94
|
+
statement = statement.parent;
|
95
|
+
}
|
96
|
+
break;
|
97
|
+
}
|
98
|
+
statement = statement.parent;
|
99
|
+
}
|
100
|
+
if (!statement) {
|
101
|
+
return;
|
102
|
+
}
|
103
|
+
let variableNameNode;
|
104
|
+
let aliasName;
|
105
|
+
let variableTypeEvaluator;
|
106
|
+
let hasDefaultValue = false;
|
107
|
+
let isKeywordOnly = types_1.ClassType.isDataClassKeywordOnlyParams(classType) || sawKeywordOnlySeparator;
|
108
|
+
let defaultValueExpression;
|
109
|
+
let includeInInit = true;
|
110
|
+
if (statement.nodeType === 3 /* Assignment */) {
|
111
|
+
if (statement.leftExpression.nodeType === 54 /* TypeAnnotation */ &&
|
112
|
+
statement.leftExpression.valueExpression.nodeType === 38 /* Name */) {
|
113
|
+
variableNameNode = statement.leftExpression.valueExpression;
|
114
|
+
const assignmentStatement = statement;
|
115
|
+
variableTypeEvaluator = () => evaluator.getTypeOfAnnotation(assignmentStatement.leftExpression.typeAnnotation, {
|
116
|
+
isVariableAnnotation: true,
|
117
|
+
allowFinal: true,
|
118
|
+
allowClassVar: true,
|
119
|
+
});
|
120
|
+
}
|
121
|
+
hasDefaultValue = true;
|
122
|
+
defaultValueExpression = statement.rightExpression;
|
123
|
+
// If the RHS of the assignment is assigning a field instance where the
|
124
|
+
// "init" parameter is set to false, do not include it in the init method.
|
125
|
+
if (statement.rightExpression.nodeType === 9 /* Call */) {
|
126
|
+
const callType = evaluator.getTypeOfExpression(statement.rightExpression.leftExpression, 2 /* DoNotSpecialize */).type;
|
127
|
+
if (isDataclassFieldConstructor(callType, ((_b = classType.details.dataClassBehaviors) === null || _b === void 0 ? void 0 : _b.fieldDescriptorNames) || [])) {
|
128
|
+
const initArg = statement.rightExpression.arguments.find((arg) => { var _a; return ((_a = arg.name) === null || _a === void 0 ? void 0 : _a.value) === 'init'; });
|
129
|
+
if (initArg && initArg.valueExpression) {
|
130
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
|
131
|
+
const value = (0, staticExpressions_1.evaluateStaticBoolExpression)(initArg.valueExpression, fileInfo.executionEnvironment, fileInfo.definedConstants);
|
132
|
+
if (value === false) {
|
133
|
+
includeInInit = false;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
else {
|
137
|
+
// See if the field constructor has an `init` parameter with
|
138
|
+
// a default value.
|
139
|
+
let callTarget;
|
140
|
+
if ((0, types_1.isFunction)(callType)) {
|
141
|
+
callTarget = callType;
|
142
|
+
}
|
143
|
+
else if ((0, types_1.isOverloadedFunction)(callType)) {
|
144
|
+
callTarget = evaluator.getBestOverloadForArguments(statement.rightExpression, callType, statement.rightExpression.arguments);
|
145
|
+
}
|
146
|
+
else if ((0, types_1.isInstantiableClass)(callType)) {
|
147
|
+
const initCall = evaluator.getBoundMethod(callType, '__init__');
|
148
|
+
if (initCall) {
|
149
|
+
if ((0, types_1.isFunction)(initCall)) {
|
150
|
+
callTarget = initCall;
|
151
|
+
}
|
152
|
+
else if ((0, types_1.isOverloadedFunction)(initCall)) {
|
153
|
+
callTarget = evaluator.getBestOverloadForArguments(statement.rightExpression, initCall, statement.rightExpression.arguments);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
if (callTarget) {
|
158
|
+
const initParam = callTarget.details.parameters.find((p) => p.name === 'init');
|
159
|
+
if (initParam && initParam.defaultValueExpression && initParam.hasDeclaredType) {
|
160
|
+
if ((0, types_1.isClass)(initParam.type) &&
|
161
|
+
types_1.ClassType.isBuiltIn(initParam.type, 'bool') &&
|
162
|
+
(0, typeUtils_1.isLiteralType)(initParam.type)) {
|
163
|
+
if (initParam.type.literalValue === false) {
|
164
|
+
includeInInit = false;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
const kwOnlyArg = statement.rightExpression.arguments.find((arg) => { var _a; return ((_a = arg.name) === null || _a === void 0 ? void 0 : _a.value) === 'kw_only'; });
|
171
|
+
if (kwOnlyArg && kwOnlyArg.valueExpression) {
|
172
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
|
173
|
+
const value = (0, staticExpressions_1.evaluateStaticBoolExpression)(kwOnlyArg.valueExpression, fileInfo.executionEnvironment, fileInfo.definedConstants);
|
174
|
+
if (value === false) {
|
175
|
+
isKeywordOnly = false;
|
176
|
+
}
|
177
|
+
else if (value === true) {
|
178
|
+
isKeywordOnly = true;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
const defaultArg = statement.rightExpression.arguments.find((arg) => {
|
182
|
+
var _a, _b, _c;
|
183
|
+
return ((_a = arg.name) === null || _a === void 0 ? void 0 : _a.value) === 'default' ||
|
184
|
+
((_b = arg.name) === null || _b === void 0 ? void 0 : _b.value) === 'default_factory' ||
|
185
|
+
((_c = arg.name) === null || _c === void 0 ? void 0 : _c.value) === 'factory';
|
186
|
+
});
|
187
|
+
hasDefaultValue = !!defaultArg;
|
188
|
+
if (defaultArg === null || defaultArg === void 0 ? void 0 : defaultArg.valueExpression) {
|
189
|
+
defaultValueExpression = defaultArg.valueExpression;
|
190
|
+
}
|
191
|
+
const aliasArg = statement.rightExpression.arguments.find((arg) => { var _a; return ((_a = arg.name) === null || _a === void 0 ? void 0 : _a.value) === 'alias'; });
|
192
|
+
if (aliasArg) {
|
193
|
+
const valueType = evaluator.getTypeOfExpression(aliasArg.valueExpression).type;
|
194
|
+
if ((0, types_1.isClassInstance)(valueType) &&
|
195
|
+
types_1.ClassType.isBuiltIn(valueType, 'str') &&
|
196
|
+
(0, typeUtils_1.isLiteralType)(valueType)) {
|
197
|
+
aliasName = valueType.literalValue;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
203
|
+
else if (statement.nodeType === 54 /* TypeAnnotation */) {
|
204
|
+
if (statement.valueExpression.nodeType === 38 /* Name */) {
|
205
|
+
variableNameNode = statement.valueExpression;
|
206
|
+
const annotationStatement = statement;
|
207
|
+
variableTypeEvaluator = () => evaluator.getTypeOfAnnotation(annotationStatement.typeAnnotation, {
|
208
|
+
isVariableAnnotation: true,
|
209
|
+
allowFinal: true,
|
210
|
+
allowClassVar: true,
|
211
|
+
});
|
212
|
+
// Is this a KW_ONLY separator introduced in Python 3.10?
|
213
|
+
if (statement.valueExpression.value === '_') {
|
214
|
+
const annotatedType = variableTypeEvaluator();
|
215
|
+
if ((0, types_1.isClassInstance)(annotatedType) && types_1.ClassType.isBuiltIn(annotatedType, 'KW_ONLY')) {
|
216
|
+
sawKeywordOnlySeparator = true;
|
217
|
+
variableNameNode = undefined;
|
218
|
+
variableTypeEvaluator = undefined;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
}
|
223
|
+
if (variableNameNode && variableTypeEvaluator) {
|
224
|
+
const variableName = variableNameNode.value;
|
225
|
+
// Don't include class vars. PEP 557 indicates that they shouldn't
|
226
|
+
// be considered data class entries.
|
227
|
+
const variableSymbol = classType.details.fields.get(variableName);
|
228
|
+
const isFinal = variableSymbol === null || variableSymbol === void 0 ? void 0 : variableSymbol.getDeclarations().some((decl) => decl.type === 1 /* Variable */ && decl.isFinal);
|
229
|
+
if ((variableSymbol === null || variableSymbol === void 0 ? void 0 : variableSymbol.isClassVar()) && !isFinal) {
|
230
|
+
// If an ancestor class declared an instance variable but this dataclass
|
231
|
+
// declares a ClassVar, delete the older one from the full data class entries.
|
232
|
+
// We exclude final variables here because a Final type annotation is implicitly
|
233
|
+
// considered a ClassVar by the binder, but dataclass rules are different.
|
234
|
+
const index = fullDataClassEntries.findIndex((p) => p.name === variableName);
|
235
|
+
if (index >= 0) {
|
236
|
+
fullDataClassEntries.splice(index, 1);
|
237
|
+
}
|
238
|
+
const dataClassEntry = {
|
239
|
+
name: variableName,
|
240
|
+
classType,
|
241
|
+
alias: aliasName,
|
242
|
+
isKeywordOnly: false,
|
243
|
+
hasDefault: hasDefaultValue,
|
244
|
+
defaultValueExpression,
|
245
|
+
includeInInit,
|
246
|
+
type: types_1.UnknownType.create(),
|
247
|
+
isClassVar: true,
|
248
|
+
};
|
249
|
+
localDataClassEntries.push(dataClassEntry);
|
250
|
+
}
|
251
|
+
else {
|
252
|
+
// Create a new data class entry, but defer evaluation of the type until
|
253
|
+
// we've compiled the full list of data class entries for this class. This
|
254
|
+
// allows us to handle circular references in types.
|
255
|
+
const dataClassEntry = {
|
256
|
+
name: variableName,
|
257
|
+
classType,
|
258
|
+
alias: aliasName,
|
259
|
+
isKeywordOnly,
|
260
|
+
hasDefault: hasDefaultValue,
|
261
|
+
defaultValueExpression,
|
262
|
+
includeInInit,
|
263
|
+
type: types_1.UnknownType.create(),
|
264
|
+
isClassVar: false,
|
265
|
+
};
|
266
|
+
localEntryTypeEvaluator.push({ entry: dataClassEntry, evaluator: variableTypeEvaluator });
|
267
|
+
// Add the new entry to the local entry list.
|
268
|
+
let insertIndex = localDataClassEntries.findIndex((e) => e.name === variableName);
|
269
|
+
if (insertIndex >= 0) {
|
270
|
+
localDataClassEntries[insertIndex] = dataClassEntry;
|
271
|
+
}
|
272
|
+
else {
|
273
|
+
localDataClassEntries.push(dataClassEntry);
|
274
|
+
}
|
275
|
+
// Add the new entry to the full entry list.
|
276
|
+
insertIndex = fullDataClassEntries.findIndex((p) => p.name === variableName);
|
277
|
+
if (insertIndex >= 0) {
|
278
|
+
const oldEntry = fullDataClassEntries[insertIndex];
|
279
|
+
// While this isn't documented behavior, it appears that the dataclass implementation
|
280
|
+
// causes overridden variables to "inherit" default values from parent classes.
|
281
|
+
if (!dataClassEntry.hasDefault && oldEntry.hasDefault) {
|
282
|
+
dataClassEntry.hasDefault = true;
|
283
|
+
dataClassEntry.defaultValueExpression = oldEntry.defaultValueExpression;
|
284
|
+
hasDefaultValue = true;
|
285
|
+
}
|
286
|
+
fullDataClassEntries[insertIndex] = dataClassEntry;
|
287
|
+
}
|
288
|
+
else {
|
289
|
+
fullDataClassEntries.push(dataClassEntry);
|
290
|
+
insertIndex = fullDataClassEntries.length - 1;
|
291
|
+
}
|
292
|
+
// If we've already seen a entry with a default value defined,
|
293
|
+
// all subsequent entries must also have default values.
|
294
|
+
if (!isKeywordOnly && includeInInit && !skipSynthesizeInit && !hasDefaultValue) {
|
295
|
+
const firstDefaultValueIndex = fullDataClassEntries.findIndex((p) => p.hasDefault && p.includeInInit && !p.isKeywordOnly);
|
296
|
+
if (firstDefaultValueIndex >= 0 && firstDefaultValueIndex < insertIndex) {
|
297
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassFieldWithDefault(), variableNameNode);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
}
|
303
|
+
else {
|
304
|
+
// The symbol had no declared type, so it is (mostly) ignored by dataclasses.
|
305
|
+
// However, if it is assigned a field descriptor, it will result in a
|
306
|
+
// runtime exception.
|
307
|
+
const declarations = symbol.getDeclarations();
|
308
|
+
if (declarations.length === 0) {
|
309
|
+
return;
|
310
|
+
}
|
311
|
+
const lastDecl = declarations[declarations.length - 1];
|
312
|
+
if (lastDecl.type !== 1 /* Variable */) {
|
313
|
+
return;
|
314
|
+
}
|
315
|
+
const statement = lastDecl.node.parent;
|
316
|
+
if (!statement || statement.nodeType !== 3 /* Assignment */) {
|
317
|
+
return;
|
318
|
+
}
|
319
|
+
// If the RHS of the assignment is assigning a field instance where the
|
320
|
+
// "init" parameter is set to false, do not include it in the init method.
|
321
|
+
if (statement.rightExpression.nodeType === 9 /* Call */) {
|
322
|
+
const callType = evaluator.getTypeOfExpression(statement.rightExpression.leftExpression, 2 /* DoNotSpecialize */).type;
|
323
|
+
if (isDataclassFieldConstructor(callType, ((_c = classType.details.dataClassBehaviors) === null || _c === void 0 ? void 0 : _c.fieldDescriptorNames) || [])) {
|
324
|
+
evaluator.addDiagnostic(AnalyzerNodeInfo.getFileInfo(node).diagnosticRuleSet.reportGeneralTypeIssues, diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.Localizer.Diagnostic.dataClassFieldWithoutAnnotation(), statement.rightExpression);
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
}
|
329
|
+
});
|
330
|
+
classType.details.dataClassEntries = localDataClassEntries;
|
331
|
+
// Now that the dataClassEntries field has been set with a complete list
|
332
|
+
// of local data class entries for this class, perform deferred type
|
333
|
+
// evaluations. This could involve circular type dependencies, so it's
|
334
|
+
// required that the list be complete (even if types are not yet accurate)
|
335
|
+
// before we perform the type evaluations.
|
336
|
+
localEntryTypeEvaluator.forEach((entryEvaluator) => {
|
337
|
+
entryEvaluator.entry.type = entryEvaluator.evaluator();
|
338
|
+
});
|
339
|
+
const symbolTable = classType.details.fields;
|
340
|
+
const keywordOnlyParams = [];
|
341
|
+
if (!skipSynthesizeInit && !hasExistingInitMethod && allAncestorsKnown) {
|
342
|
+
fullDataClassEntries.forEach((entry) => {
|
343
|
+
if (entry.includeInInit) {
|
344
|
+
// If the type refers to Self of the parent class, we need to
|
345
|
+
// transform it to refer to the Self of this subclass.
|
346
|
+
let effectiveType = entry.type;
|
347
|
+
if (entry.classType !== classType && (0, typeUtils_1.requiresSpecialization)(effectiveType)) {
|
348
|
+
const typeVarContext = new typeVarContext_1.TypeVarContext((0, typeUtils_1.getTypeVarScopeId)(entry.classType));
|
349
|
+
(0, typeUtils_1.populateTypeVarContextForSelfType)(typeVarContext, entry.classType, classType);
|
350
|
+
effectiveType = (0, typeUtils_1.applySolvedTypeVars)(effectiveType, typeVarContext);
|
351
|
+
}
|
352
|
+
// Is the field type a descriptor object? If so, we need to extract the corresponding
|
353
|
+
// type of the __init__ method parameter from the __set__ method.
|
354
|
+
effectiveType = transformDescriptorType(evaluator, effectiveType);
|
355
|
+
const functionParam = {
|
356
|
+
category: 0 /* Simple */,
|
357
|
+
name: entry.alias || entry.name,
|
358
|
+
hasDefault: entry.hasDefault,
|
359
|
+
defaultValueExpression: entry.defaultValueExpression,
|
360
|
+
type: effectiveType,
|
361
|
+
hasDeclaredType: true,
|
362
|
+
};
|
363
|
+
if (entry.isKeywordOnly) {
|
364
|
+
keywordOnlyParams.push(functionParam);
|
365
|
+
}
|
366
|
+
else {
|
367
|
+
types_1.FunctionType.addParameter(initType, functionParam);
|
368
|
+
}
|
369
|
+
}
|
370
|
+
});
|
371
|
+
if (keywordOnlyParams.length > 0) {
|
372
|
+
types_1.FunctionType.addParameter(initType, {
|
373
|
+
category: 1 /* VarArgList */,
|
374
|
+
type: types_1.AnyType.create(),
|
375
|
+
});
|
376
|
+
keywordOnlyParams.forEach((param) => {
|
377
|
+
types_1.FunctionType.addParameter(initType, param);
|
378
|
+
});
|
379
|
+
}
|
380
|
+
symbolTable.set('__init__', symbol_1.Symbol.createWithType(4 /* ClassMember */, initType));
|
381
|
+
symbolTable.set('__new__', symbol_1.Symbol.createWithType(4 /* ClassMember */, newType));
|
382
|
+
}
|
383
|
+
// Synthesize the __match_args__ class variable if it doesn't exist.
|
384
|
+
const strType = evaluator.getBuiltInType(node, 'str');
|
385
|
+
const tupleClassType = evaluator.getBuiltInType(node, 'tuple');
|
386
|
+
if (tupleClassType &&
|
387
|
+
(0, types_1.isInstantiableClass)(tupleClassType) &&
|
388
|
+
strType &&
|
389
|
+
(0, types_1.isInstantiableClass)(strType) &&
|
390
|
+
!symbolTable.has('__match_args__')) {
|
391
|
+
const matchArgsNames = [];
|
392
|
+
fullDataClassEntries.forEach((entry) => {
|
393
|
+
if (entry.includeInInit && !entry.isKeywordOnly) {
|
394
|
+
// Use the field name, not its alias (if it has one).
|
395
|
+
matchArgsNames.push(entry.name);
|
396
|
+
}
|
397
|
+
});
|
398
|
+
const literalTypes = matchArgsNames.map((name) => {
|
399
|
+
return { type: types_1.ClassType.cloneAsInstance(types_1.ClassType.cloneWithLiteral(strType, name)), isUnbounded: false };
|
400
|
+
});
|
401
|
+
const matchArgsType = types_1.ClassType.cloneAsInstance((0, typeUtils_1.specializeTupleClass)(tupleClassType, literalTypes));
|
402
|
+
symbolTable.set('__match_args__', symbol_1.Symbol.createWithType(4 /* ClassMember */, matchArgsType));
|
403
|
+
}
|
404
|
+
const synthesizeComparisonMethod = (operator, paramType) => {
|
405
|
+
const operatorMethod = types_1.FunctionType.createSynthesizedInstance(operator);
|
406
|
+
types_1.FunctionType.addParameter(operatorMethod, selfParam);
|
407
|
+
types_1.FunctionType.addParameter(operatorMethod, {
|
408
|
+
category: 0 /* Simple */,
|
409
|
+
name: 'other',
|
410
|
+
type: paramType,
|
411
|
+
hasDeclaredType: true,
|
412
|
+
});
|
413
|
+
operatorMethod.details.declaredReturnType = evaluator.getBuiltInObject(node, 'bool');
|
414
|
+
symbolTable.set(operator, symbol_1.Symbol.createWithType(4 /* ClassMember */, operatorMethod));
|
415
|
+
};
|
416
|
+
// Synthesize comparison operators.
|
417
|
+
if (!types_1.ClassType.isSkipSynthesizedDataClassEq(classType)) {
|
418
|
+
synthesizeComparisonMethod('__eq__', evaluator.getBuiltInObject(node, 'object'));
|
419
|
+
}
|
420
|
+
if (types_1.ClassType.isSynthesizedDataclassOrder(classType)) {
|
421
|
+
const objType = types_1.ClassType.cloneAsInstance(classType);
|
422
|
+
['__lt__', '__le__', '__gt__', '__ge__'].forEach((operator) => {
|
423
|
+
synthesizeComparisonMethod(operator, objType);
|
424
|
+
});
|
425
|
+
}
|
426
|
+
let synthesizeHashFunction = !types_1.ClassType.isSkipSynthesizedDataClassEq(classType) && types_1.ClassType.isFrozenDataClass(classType);
|
427
|
+
const synthesizeHashNone = !types_1.ClassType.isSkipSynthesizedDataClassEq(classType) && !types_1.ClassType.isFrozenDataClass(classType);
|
428
|
+
if (skipSynthesizeHash) {
|
429
|
+
synthesizeHashFunction = false;
|
430
|
+
}
|
431
|
+
// If the user has indicated that a hash function should be generated even if it's unsafe
|
432
|
+
// to do so or there is already a hash function present, override the default logic.
|
433
|
+
if (types_1.ClassType.isSynthesizeDataClassUnsafeHash(classType)) {
|
434
|
+
synthesizeHashFunction = true;
|
435
|
+
}
|
436
|
+
if (synthesizeHashFunction) {
|
437
|
+
const hashMethod = types_1.FunctionType.createSynthesizedInstance('__hash__');
|
438
|
+
types_1.FunctionType.addParameter(hashMethod, selfParam);
|
439
|
+
hashMethod.details.declaredReturnType = evaluator.getBuiltInObject(node, 'int');
|
440
|
+
symbolTable.set('__hash__', symbol_1.Symbol.createWithType(4 /* ClassMember */, hashMethod));
|
441
|
+
}
|
442
|
+
else if (synthesizeHashNone && !skipSynthesizeHash) {
|
443
|
+
symbolTable.set('__hash__', symbol_1.Symbol.createWithType(4 /* ClassMember */, types_1.NoneType.createInstance()));
|
444
|
+
}
|
445
|
+
let dictType = evaluator.getBuiltInType(node, 'dict');
|
446
|
+
if ((0, types_1.isInstantiableClass)(dictType)) {
|
447
|
+
dictType = types_1.ClassType.cloneAsInstance(types_1.ClassType.cloneForSpecialization(dictType, [evaluator.getBuiltInObject(node, 'str'), types_1.AnyType.create()],
|
448
|
+
/* isTypeArgumentExplicit */ true));
|
449
|
+
}
|
450
|
+
symbolTable.set('__dataclass_fields__', symbol_1.Symbol.createWithType(4 /* ClassMember */, dictType));
|
451
|
+
if (types_1.ClassType.isGeneratedDataClassSlots(classType) && classType.details.localSlotsNames === undefined) {
|
452
|
+
classType.details.localSlotsNames = localDataClassEntries.map((entry) => entry.name);
|
453
|
+
}
|
454
|
+
// If this dataclass derived from a NamedTuple, update the NamedTuple with
|
455
|
+
// the specialized entry types.
|
456
|
+
(0, namedTuples_1.updateNamedTupleBaseClass)(classType, fullDataClassEntries.map((entry) => entry.type),
|
457
|
+
/* isTypeArgumentExplicit */ true);
|
458
|
+
}
|
459
|
+
exports.synthesizeDataClassMethods = synthesizeDataClassMethods;
|
460
|
+
// If the specified type is a descriptor — in particular, if it implements a
|
461
|
+
// __set__ method, this method transforms the type into the input parameter
|
462
|
+
// for the set method.
|
463
|
+
function transformDescriptorType(evaluator, type) {
|
464
|
+
if (!(0, types_1.isClassInstance)(type)) {
|
465
|
+
return type;
|
466
|
+
}
|
467
|
+
const setMethodInfo = (0, typeUtils_1.lookUpObjectMember)(type, '__set__');
|
468
|
+
if (!setMethodInfo) {
|
469
|
+
return type;
|
470
|
+
}
|
471
|
+
const setMethodType = evaluator.getTypeOfMember(setMethodInfo);
|
472
|
+
if (!(0, types_1.isFunction)(setMethodType)) {
|
473
|
+
return type;
|
474
|
+
}
|
475
|
+
const boundSetMethod = evaluator.bindFunctionToClassOrObject(type, setMethodType);
|
476
|
+
if (!boundSetMethod || !(0, types_1.isFunction)(boundSetMethod) || boundSetMethod.details.parameters.length < 2) {
|
477
|
+
return type;
|
478
|
+
}
|
479
|
+
// The value parameter for a bound __set__ method is parameter index 1.
|
480
|
+
return types_1.FunctionType.getEffectiveParameterType(boundSetMethod, 1);
|
481
|
+
}
|
482
|
+
// Builds a sorted list of dataclass entries that are inherited by
|
483
|
+
// the specified class. These entries must be unique and in reverse-MRO
|
484
|
+
// order. Returns true if all of the class types in the hierarchy are
|
485
|
+
// known, false if one or more are unknown.
|
486
|
+
function addInheritedDataClassEntries(classType, entries) {
|
487
|
+
let allAncestorsAreKnown = true;
|
488
|
+
for (let i = classType.details.mro.length - 1; i >= 0; i--) {
|
489
|
+
const mroClass = classType.details.mro[i];
|
490
|
+
if ((0, types_1.isInstantiableClass)(mroClass)) {
|
491
|
+
const typeVarContext = (0, typeUtils_1.buildTypeVarContextFromSpecializedClass)(mroClass, /* makeConcrete */ false);
|
492
|
+
const dataClassEntries = types_1.ClassType.getDataClassEntries(mroClass);
|
493
|
+
// Add the entries to the end of the list, replacing same-named
|
494
|
+
// entries if found.
|
495
|
+
dataClassEntries.forEach((entry) => {
|
496
|
+
const existingIndex = entries.findIndex((e) => e.name === entry.name);
|
497
|
+
// If the type from the parent class is generic, we need to convert
|
498
|
+
// to the type parameter namespace of child class.
|
499
|
+
const updatedEntry = { ...entry };
|
500
|
+
updatedEntry.type = (0, typeUtils_1.applySolvedTypeVars)(updatedEntry.type, typeVarContext);
|
501
|
+
if (entry.isClassVar) {
|
502
|
+
// If this entry is a class variable, it overrides an existing
|
503
|
+
// instance variable, so delete it.
|
504
|
+
if (existingIndex >= 0) {
|
505
|
+
entries.splice(existingIndex, 1);
|
506
|
+
}
|
507
|
+
}
|
508
|
+
else if (existingIndex >= 0) {
|
509
|
+
entries[existingIndex] = updatedEntry;
|
510
|
+
}
|
511
|
+
else {
|
512
|
+
entries.push(updatedEntry);
|
513
|
+
}
|
514
|
+
});
|
515
|
+
}
|
516
|
+
else {
|
517
|
+
allAncestorsAreKnown = false;
|
518
|
+
}
|
519
|
+
}
|
520
|
+
return allAncestorsAreKnown;
|
521
|
+
}
|
522
|
+
function isDataclassFieldConstructor(type, fieldDescriptorNames) {
|
523
|
+
let callName;
|
524
|
+
if ((0, types_1.isFunction)(type)) {
|
525
|
+
callName = type.details.fullName;
|
526
|
+
}
|
527
|
+
else if ((0, types_1.isOverloadedFunction)(type)) {
|
528
|
+
callName = type.overloads[0].details.fullName;
|
529
|
+
}
|
530
|
+
else if ((0, types_1.isInstantiableClass)(type)) {
|
531
|
+
callName = type.details.fullName;
|
532
|
+
}
|
533
|
+
if (!callName) {
|
534
|
+
return false;
|
535
|
+
}
|
536
|
+
return fieldDescriptorNames.some((name) => name === callName);
|
537
|
+
}
|
538
|
+
function validateDataClassTransformDecorator(evaluator, node) {
|
539
|
+
const behaviors = {
|
540
|
+
keywordOnlyParams: false,
|
541
|
+
generateEq: true,
|
542
|
+
generateOrder: false,
|
543
|
+
fieldDescriptorNames: [],
|
544
|
+
};
|
545
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(node);
|
546
|
+
// Parse the arguments to the call.
|
547
|
+
node.arguments.forEach((arg) => {
|
548
|
+
if (!arg.name || arg.argumentCategory !== 0 /* Simple */) {
|
549
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassTransformPositionalParam(), arg);
|
550
|
+
return;
|
551
|
+
}
|
552
|
+
switch (arg.name.value) {
|
553
|
+
case 'kw_only_default': {
|
554
|
+
const value = (0, staticExpressions_1.evaluateStaticBoolExpression)(arg.valueExpression, fileInfo.executionEnvironment, fileInfo.definedConstants);
|
555
|
+
if (value === undefined) {
|
556
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassTransformExpectedBoolLiteral(), arg.valueExpression);
|
557
|
+
return;
|
558
|
+
}
|
559
|
+
behaviors.keywordOnlyParams = value;
|
560
|
+
break;
|
561
|
+
}
|
562
|
+
case 'eq_default': {
|
563
|
+
const value = (0, staticExpressions_1.evaluateStaticBoolExpression)(arg.valueExpression, fileInfo.executionEnvironment, fileInfo.definedConstants);
|
564
|
+
if (value === undefined) {
|
565
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassTransformExpectedBoolLiteral(), arg.valueExpression);
|
566
|
+
return;
|
567
|
+
}
|
568
|
+
behaviors.generateEq = value;
|
569
|
+
break;
|
570
|
+
}
|
571
|
+
case 'order_default': {
|
572
|
+
const value = (0, staticExpressions_1.evaluateStaticBoolExpression)(arg.valueExpression, fileInfo.executionEnvironment, fileInfo.definedConstants);
|
573
|
+
if (value === undefined) {
|
574
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassTransformExpectedBoolLiteral(), arg.valueExpression);
|
575
|
+
return;
|
576
|
+
}
|
577
|
+
behaviors.generateOrder = value;
|
578
|
+
break;
|
579
|
+
}
|
580
|
+
// Earlier versions of the dataclass_transform spec used the name "field_descriptors"
|
581
|
+
// rather than "field_specifiers". The older name is now deprecated but still supported
|
582
|
+
// for the time being because some libraries shipped with the older __dataclass_transform__
|
583
|
+
// form that supported this older parameter name.
|
584
|
+
case 'field_descriptors':
|
585
|
+
case 'field_specifiers': {
|
586
|
+
const valueType = evaluator.getTypeOfExpression(arg.valueExpression).type;
|
587
|
+
if (!(0, types_1.isClassInstance)(valueType) ||
|
588
|
+
!types_1.ClassType.isBuiltIn(valueType, 'tuple') ||
|
589
|
+
!valueType.tupleTypeArguments ||
|
590
|
+
valueType.tupleTypeArguments.some((entry) => !(0, types_1.isInstantiableClass)(entry.type) &&
|
591
|
+
!(0, types_1.isFunction)(entry.type) &&
|
592
|
+
!(0, types_1.isOverloadedFunction)(entry.type))) {
|
593
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassTransformFieldSpecifier().format({
|
594
|
+
type: evaluator.printType(valueType),
|
595
|
+
}), arg.valueExpression);
|
596
|
+
return;
|
597
|
+
}
|
598
|
+
if (!behaviors.fieldDescriptorNames) {
|
599
|
+
behaviors.fieldDescriptorNames = [];
|
600
|
+
}
|
601
|
+
valueType.tupleTypeArguments.forEach((arg) => {
|
602
|
+
if ((0, types_1.isInstantiableClass)(arg.type) || (0, types_1.isFunction)(arg.type)) {
|
603
|
+
behaviors.fieldDescriptorNames.push(arg.type.details.fullName);
|
604
|
+
}
|
605
|
+
else if ((0, types_1.isOverloadedFunction)(arg.type)) {
|
606
|
+
behaviors.fieldDescriptorNames.push(arg.type.overloads[0].details.fullName);
|
607
|
+
}
|
608
|
+
});
|
609
|
+
break;
|
610
|
+
}
|
611
|
+
default:
|
612
|
+
evaluator.addError(localize_1.Localizer.Diagnostic.dataClassTransformUnknownArgument().format({ name: arg.name.value }), arg.valueExpression);
|
613
|
+
break;
|
614
|
+
}
|
615
|
+
});
|
616
|
+
return behaviors;
|
617
|
+
}
|
618
|
+
exports.validateDataClassTransformDecorator = validateDataClassTransformDecorator;
|
619
|
+
function getDataclassDecoratorBehaviors(type) {
|
620
|
+
var _a;
|
621
|
+
let functionType;
|
622
|
+
if ((0, types_1.isFunction)(type)) {
|
623
|
+
functionType = type;
|
624
|
+
}
|
625
|
+
else if ((0, types_1.isOverloadedFunction)(type)) {
|
626
|
+
// Find the first overload or implementation that contains a
|
627
|
+
// dataclass_transform decorator. If more than one have such a decorator,
|
628
|
+
// only the first one will be honored, as per PEP 681.
|
629
|
+
functionType =
|
630
|
+
(_a = type.overloads.find((overload) => !!overload.details.decoratorDataClassBehaviors)) !== null && _a !== void 0 ? _a : type.overloads[0];
|
631
|
+
}
|
632
|
+
if (!functionType) {
|
633
|
+
return undefined;
|
634
|
+
}
|
635
|
+
if (functionType.details.decoratorDataClassBehaviors) {
|
636
|
+
return functionType.details.decoratorDataClassBehaviors;
|
637
|
+
}
|
638
|
+
// Is this the built-in dataclass? If so, return the default behaviors.
|
639
|
+
if (functionType.details.fullName === 'dataclasses.dataclass') {
|
640
|
+
return {
|
641
|
+
keywordOnlyParams: false,
|
642
|
+
generateEq: true,
|
643
|
+
generateOrder: false,
|
644
|
+
fieldDescriptorNames: ['dataclasses.field', 'dataclasses.Field'],
|
645
|
+
};
|
646
|
+
}
|
647
|
+
return undefined;
|
648
|
+
}
|
649
|
+
exports.getDataclassDecoratorBehaviors = getDataclassDecoratorBehaviors;
|
650
|
+
function applyDataClassBehaviorOverride(evaluator, errorNode, classType, argName, argValue) {
|
651
|
+
const fileInfo = AnalyzerNodeInfo.getFileInfo(errorNode);
|
652
|
+
const value = (0, staticExpressions_1.evaluateStaticBoolExpression)(argValue, fileInfo.executionEnvironment, fileInfo.definedConstants);
|
653
|
+
switch (argName) {
|
654
|
+
case 'order':
|
655
|
+
if (value === true) {
|
656
|
+
classType.details.flags |= 64 /* SynthesizedDataClassOrder */;
|
657
|
+
}
|
658
|
+
else if (value === false) {
|
659
|
+
classType.details.flags &= ~64 /* SynthesizedDataClassOrder */;
|
660
|
+
}
|
661
|
+
break;
|
662
|
+
case 'kw_only':
|
663
|
+
if (value === false) {
|
664
|
+
classType.details.flags &= ~2097152 /* DataClassKeywordOnlyParams */;
|
665
|
+
}
|
666
|
+
else if (value === true) {
|
667
|
+
classType.details.flags |= 2097152 /* DataClassKeywordOnlyParams */;
|
668
|
+
}
|
669
|
+
break;
|
670
|
+
case 'frozen': {
|
671
|
+
let hasUnfrozenBaseClass = false;
|
672
|
+
let hasFrozenBaseClass = false;
|
673
|
+
classType.details.baseClasses.forEach((baseClass) => {
|
674
|
+
if ((0, types_1.isInstantiableClass)(baseClass) && types_1.ClassType.isDataClass(baseClass)) {
|
675
|
+
if (types_1.ClassType.isFrozenDataClass(baseClass)) {
|
676
|
+
hasFrozenBaseClass = true;
|
677
|
+
}
|
678
|
+
else if (!baseClass.details.classDataClassTransform &&
|
679
|
+
!(baseClass.details.declaredMetaclass &&
|
680
|
+
(0, types_1.isInstantiableClass)(baseClass.details.declaredMetaclass) &&
|
681
|
+
!!baseClass.details.declaredMetaclass.details.classDataClassTransform)) {
|
682
|
+
// If this base class is unfrozen and isn't the class that directly
|
683
|
+
// references the metaclass that provides dataclass-like behaviors,
|
684
|
+
// we'll assume we're deriving from an unfrozen dataclass.
|
685
|
+
hasUnfrozenBaseClass = true;
|
686
|
+
}
|
687
|
+
}
|
688
|
+
});
|
689
|
+
if (value === true || hasFrozenBaseClass) {
|
690
|
+
classType.details.flags |= 8 /* FrozenDataClass */;
|
691
|
+
// A frozen dataclass cannot derive from a non-frozen dataclass.
|
692
|
+
if (hasUnfrozenBaseClass) {
|
693
|
+
evaluator.addDiagnostic(fileInfo.diagnosticRuleSet.reportGeneralTypeIssues, diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.Localizer.Diagnostic.dataClassBaseClassNotFrozen(), errorNode);
|
694
|
+
}
|
695
|
+
}
|
696
|
+
break;
|
697
|
+
}
|
698
|
+
case 'init':
|
699
|
+
if (value === false) {
|
700
|
+
classType.details.flags |= 16 /* SkipSynthesizedDataClassInit */;
|
701
|
+
}
|
702
|
+
else if (value === true) {
|
703
|
+
classType.details.flags &= ~16 /* SkipSynthesizedDataClassInit */;
|
704
|
+
}
|
705
|
+
break;
|
706
|
+
case 'eq':
|
707
|
+
if (value === false) {
|
708
|
+
classType.details.flags |= 32 /* SkipSynthesizedDataClassEq */;
|
709
|
+
}
|
710
|
+
else if (value === true) {
|
711
|
+
classType.details.flags &= ~32 /* SkipSynthesizedDataClassEq */;
|
712
|
+
}
|
713
|
+
break;
|
714
|
+
case 'slots':
|
715
|
+
if (value === true) {
|
716
|
+
classType.details.flags |= 33554432 /* GenerateDataClassSlots */;
|
717
|
+
if (classType.details.localSlotsNames) {
|
718
|
+
evaluator.addDiagnostic(fileInfo.diagnosticRuleSet.reportGeneralTypeIssues, diagnosticRules_1.DiagnosticRule.reportGeneralTypeIssues, localize_1.Localizer.Diagnostic.dataClassSlotsOverwrite(), errorNode);
|
719
|
+
}
|
720
|
+
}
|
721
|
+
else if (value === false) {
|
722
|
+
classType.details.flags &= ~33554432 /* GenerateDataClassSlots */;
|
723
|
+
}
|
724
|
+
break;
|
725
|
+
case 'hash':
|
726
|
+
case 'unsafe_hash':
|
727
|
+
if (value === true) {
|
728
|
+
classType.details.flags |= 67108864 /* SynthesizeDataClassUnsafeHash */;
|
729
|
+
}
|
730
|
+
break;
|
731
|
+
}
|
732
|
+
}
|
733
|
+
function applyDataClassClassBehaviorOverrides(evaluator, classType, args) {
|
734
|
+
args.forEach((arg) => {
|
735
|
+
if (arg.valueExpression && arg.name) {
|
736
|
+
applyDataClassBehaviorOverride(evaluator, arg.name, classType, arg.name.value, arg.valueExpression);
|
737
|
+
}
|
738
|
+
});
|
739
|
+
}
|
740
|
+
exports.applyDataClassClassBehaviorOverrides = applyDataClassClassBehaviorOverrides;
|
741
|
+
function applyDataClassDefaultBehaviors(classType, defaultBehaviors) {
|
742
|
+
classType.details.dataClassBehaviors = defaultBehaviors;
|
743
|
+
classType.details.flags |= 4 /* DataClass */;
|
744
|
+
if (defaultBehaviors.keywordOnlyParams) {
|
745
|
+
classType.details.flags |= 2097152 /* DataClassKeywordOnlyParams */;
|
746
|
+
}
|
747
|
+
if (!defaultBehaviors.generateEq) {
|
748
|
+
classType.details.flags |= 32 /* SkipSynthesizedDataClassEq */;
|
749
|
+
}
|
750
|
+
if (defaultBehaviors.generateOrder) {
|
751
|
+
classType.details.flags |= 64 /* SynthesizedDataClassOrder */;
|
752
|
+
}
|
753
|
+
}
|
754
|
+
exports.applyDataClassDefaultBehaviors = applyDataClassDefaultBehaviors;
|
755
|
+
function applyDataClassDecorator(evaluator, classType, defaultBehaviors, callNode) {
|
756
|
+
applyDataClassDefaultBehaviors(classType, defaultBehaviors);
|
757
|
+
if (callNode === null || callNode === void 0 ? void 0 : callNode.arguments) {
|
758
|
+
applyDataClassClassBehaviorOverrides(evaluator, classType, callNode.arguments);
|
759
|
+
}
|
760
|
+
}
|
761
|
+
exports.applyDataClassDecorator = applyDataClassDecorator;
|
762
|
+
//# sourceMappingURL=dataClasses.js.map
|