@zzzen/pyright-internal 1.2.0-dev.20240728 → 1.2.0-dev.20240811
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/analysis.js +2 -2
- package/dist/analyzer/analysis.js.map +1 -1
- package/dist/analyzer/analyzerFileInfo.js +1 -2
- package/dist/analyzer/analyzerFileInfo.js.map +1 -1
- package/dist/analyzer/analyzerNodeInfo.js +20 -21
- package/dist/analyzer/analyzerNodeInfo.js.map +1 -1
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -1
- package/dist/analyzer/binder.js +8 -5
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/cacheManager.d.ts +0 -1
- package/dist/analyzer/cacheManager.js.map +1 -1
- package/dist/analyzer/checker.d.ts +4 -1
- package/dist/analyzer/checker.js +371 -254
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/circularDependency.js.map +1 -1
- package/dist/analyzer/codeFlowEngine.js +10 -10
- package/dist/analyzer/codeFlowEngine.js.map +1 -1
- package/dist/analyzer/codeFlowTypes.d.ts +17 -17
- package/dist/analyzer/codeFlowTypes.js +5 -5
- package/dist/analyzer/codeFlowTypes.js.map +1 -1
- package/dist/analyzer/codeFlowUtils.js +1 -2
- package/dist/analyzer/codeFlowUtils.js.map +1 -1
- package/dist/analyzer/commentUtils.js +1 -2
- package/dist/analyzer/commentUtils.js.map +1 -1
- package/dist/analyzer/constraintSolution.d.ts +22 -0
- package/dist/analyzer/constraintSolution.js +77 -0
- package/dist/analyzer/constraintSolution.js.map +1 -0
- package/dist/analyzer/constraintSolver.d.ts +8 -5
- package/dist/analyzer/constraintSolver.js +427 -353
- package/dist/analyzer/constraintSolver.js.map +1 -1
- package/dist/analyzer/constraintTracker.d.ts +45 -0
- package/dist/analyzer/constraintTracker.js +235 -0
- package/dist/analyzer/constraintTracker.js.map +1 -0
- package/dist/analyzer/constructorTransform.js +23 -23
- package/dist/analyzer/constructorTransform.js.map +1 -1
- package/dist/analyzer/constructors.d.ts +1 -1
- package/dist/analyzer/constructors.js +71 -51
- package/dist/analyzer/constructors.js.map +1 -1
- package/dist/analyzer/dataClasses.js +72 -58
- package/dist/analyzer/dataClasses.js.map +1 -1
- package/dist/analyzer/declaration.js +11 -11
- package/dist/analyzer/declaration.js.map +1 -1
- package/dist/analyzer/declarationUtils.js +8 -9
- package/dist/analyzer/declarationUtils.js.map +1 -1
- package/dist/analyzer/decorators.d.ts +1 -1
- package/dist/analyzer/decorators.js +34 -30
- package/dist/analyzer/decorators.js.map +1 -1
- package/dist/analyzer/docStringConversion.js +2 -3
- package/dist/analyzer/docStringConversion.js.map +1 -1
- package/dist/analyzer/docStringUtils.js +2 -3
- package/dist/analyzer/docStringUtils.js.map +1 -1
- package/dist/analyzer/enums.js +17 -14
- package/dist/analyzer/enums.js.map +1 -1
- package/dist/analyzer/functionTransform.d.ts +2 -2
- package/dist/analyzer/functionTransform.js +2 -3
- package/dist/analyzer/functionTransform.js.map +1 -1
- package/dist/analyzer/importResolver.d.ts +0 -1
- package/dist/analyzer/importResolver.js +5 -5
- package/dist/analyzer/importResolver.js.map +1 -1
- package/dist/analyzer/importStatementUtils.js +15 -15
- package/dist/analyzer/importStatementUtils.js.map +1 -1
- package/dist/analyzer/namedTuples.js +2 -3
- package/dist/analyzer/namedTuples.js.map +1 -1
- package/dist/analyzer/operations.d.ts +1 -2
- package/dist/analyzer/operations.js +101 -79
- package/dist/analyzer/operations.js.map +1 -1
- package/dist/analyzer/packageTypeReport.d.ts +3 -3
- package/dist/analyzer/packageTypeReport.js +2 -2
- package/dist/analyzer/packageTypeReport.js.map +1 -1
- package/dist/analyzer/packageTypeVerifier.js +17 -13
- package/dist/analyzer/packageTypeVerifier.js.map +1 -1
- package/dist/analyzer/parameterUtils.d.ts +3 -3
- package/dist/analyzer/parameterUtils.js +23 -25
- package/dist/analyzer/parameterUtils.js.map +1 -1
- package/dist/analyzer/parentDirectoryCache.js.map +1 -1
- package/dist/analyzer/parseTreeUtils.js +94 -92
- package/dist/analyzer/parseTreeUtils.js.map +1 -1
- package/dist/analyzer/parseTreeWalker.js +2 -2
- package/dist/analyzer/parseTreeWalker.js.map +1 -1
- package/dist/analyzer/patternMatching.js +39 -41
- package/dist/analyzer/patternMatching.js.map +1 -1
- package/dist/analyzer/program.js +5 -1
- package/dist/analyzer/program.js.map +1 -1
- package/dist/analyzer/properties.d.ts +3 -2
- package/dist/analyzer/properties.js +16 -18
- package/dist/analyzer/properties.js.map +1 -1
- package/dist/analyzer/protocols.d.ts +3 -3
- package/dist/analyzer/protocols.js +58 -60
- package/dist/analyzer/protocols.js.map +1 -1
- package/dist/analyzer/pyTypedUtils.js +2 -3
- package/dist/analyzer/pyTypedUtils.js.map +1 -1
- package/dist/analyzer/pythonPathUtils.js +6 -6
- package/dist/analyzer/pythonPathUtils.js.map +1 -1
- package/dist/analyzer/scope.js.map +1 -1
- package/dist/analyzer/scopeUtils.js +5 -6
- package/dist/analyzer/scopeUtils.js.map +1 -1
- package/dist/analyzer/service.d.ts +3 -0
- package/dist/analyzer/service.js +173 -103
- package/dist/analyzer/service.js.map +1 -1
- package/dist/analyzer/serviceUtils.js +5 -5
- package/dist/analyzer/serviceUtils.js.map +1 -1
- package/dist/analyzer/sourceFile.js.map +1 -1
- package/dist/analyzer/sourceFileInfo.js.map +1 -1
- package/dist/analyzer/sourceFileInfoUtils.js +4 -5
- package/dist/analyzer/sourceFileInfoUtils.js.map +1 -1
- package/dist/analyzer/sourceMapper.js +5 -4
- package/dist/analyzer/sourceMapper.js.map +1 -1
- package/dist/analyzer/sourceMapperUtils.js +1 -2
- package/dist/analyzer/sourceMapperUtils.js.map +1 -1
- package/dist/analyzer/staticExpressions.js +2 -3
- package/dist/analyzer/staticExpressions.js.map +1 -1
- package/dist/analyzer/symbol.js.map +1 -1
- package/dist/analyzer/symbolNameUtils.js +8 -9
- package/dist/analyzer/symbolNameUtils.js.map +1 -1
- package/dist/analyzer/symbolUtils.js +4 -5
- package/dist/analyzer/symbolUtils.js.map +1 -1
- package/dist/analyzer/testWalker.js.map +1 -1
- package/dist/analyzer/tracePrinter.js +5 -4
- package/dist/analyzer/tracePrinter.js.map +1 -1
- package/dist/analyzer/tuples.d.ts +2 -2
- package/dist/analyzer/tuples.js +14 -14
- package/dist/analyzer/tuples.js.map +1 -1
- package/dist/analyzer/typeCacheUtils.js.map +1 -1
- package/dist/analyzer/typeComplexity.js +14 -7
- package/dist/analyzer/typeComplexity.js.map +1 -1
- package/dist/analyzer/typeDocStringUtils.d.ts +2 -2
- package/dist/analyzer/typeDocStringUtils.js +34 -25
- package/dist/analyzer/typeDocStringUtils.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +1021 -993
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeEvaluatorTypes.d.ts +31 -13
- package/dist/analyzer/typeEvaluatorTypes.js.map +1 -1
- package/dist/analyzer/typeEvaluatorWithTracker.js +1 -2
- package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -1
- package/dist/analyzer/typeGuards.js +72 -64
- package/dist/analyzer/typeGuards.js.map +1 -1
- package/dist/analyzer/typePrinter.js +28 -26
- package/dist/analyzer/typePrinter.js.map +1 -1
- package/dist/analyzer/typeStubWriter.js.map +1 -1
- package/dist/analyzer/typeUtils.d.ts +36 -38
- package/dist/analyzer/typeUtils.js +465 -746
- package/dist/analyzer/typeUtils.js.map +1 -1
- package/dist/analyzer/typeWalker.d.ts +2 -2
- package/dist/analyzer/typeWalker.js +10 -5
- package/dist/analyzer/typeWalker.js.map +1 -1
- package/dist/analyzer/typedDicts.d.ts +2 -2
- package/dist/analyzer/typedDicts.js +52 -52
- package/dist/analyzer/typedDicts.js.map +1 -1
- package/dist/analyzer/types.d.ts +41 -36
- package/dist/analyzer/types.js +178 -184
- package/dist/analyzer/types.js.map +1 -1
- package/dist/backgroundAnalysisBase.d.ts +0 -1
- package/dist/backgroundAnalysisBase.js.map +1 -1
- package/dist/backgroundThreadBase.d.ts +0 -1
- package/dist/backgroundThreadBase.js +7 -7
- package/dist/backgroundThreadBase.js.map +1 -1
- package/dist/commands/commandController.js.map +1 -1
- package/dist/commands/createTypeStub.js.map +1 -1
- package/dist/commands/dumpFileDebugInfoCommand.js +2 -2
- package/dist/commands/dumpFileDebugInfoCommand.js.map +1 -1
- package/dist/commands/quickActionCommand.js.map +1 -1
- package/dist/common/cancellationUtils.js +9 -9
- package/dist/common/cancellationUtils.js.map +1 -1
- package/dist/common/chokidarFileWatcherProvider.js +3 -3
- package/dist/common/chokidarFileWatcherProvider.js.map +1 -1
- package/dist/common/collectionUtils.js +23 -23
- package/dist/common/collectionUtils.js.map +1 -1
- package/dist/common/commandLineOptions.d.ts +19 -12
- package/dist/common/commandLineOptions.js +26 -9
- package/dist/common/commandLineOptions.js.map +1 -1
- package/dist/common/commandUtils.js +1 -2
- package/dist/common/commandUtils.js.map +1 -1
- package/dist/common/configOptions.d.ts +2 -2
- package/dist/common/configOptions.js +30 -40
- package/dist/common/configOptions.js.map +1 -1
- package/dist/common/console.js +4 -4
- package/dist/common/console.js.map +1 -1
- package/dist/common/core.js +21 -21
- package/dist/common/core.js.map +1 -1
- package/dist/common/crypto.js +1 -2
- package/dist/common/crypto.js.map +1 -1
- package/dist/common/debug.js +9 -10
- package/dist/common/debug.js.map +1 -1
- package/dist/common/deferred.js +3 -4
- package/dist/common/deferred.js.map +1 -1
- package/dist/common/diagnostic.js +3 -3
- package/dist/common/diagnostic.js.map +1 -1
- package/dist/common/diagnosticSink.js.map +1 -1
- package/dist/common/envVarUtils.js +2 -3
- package/dist/common/envVarUtils.js.map +1 -1
- package/dist/common/fileBasedCancellationUtils.js +4 -4
- package/dist/common/fileBasedCancellationUtils.js.map +1 -1
- package/dist/common/fileSystem.d.ts +0 -2
- package/dist/common/fileWatcher.js +2 -2
- package/dist/common/fileWatcher.js.map +1 -1
- package/dist/common/fullAccessHost.js.map +1 -1
- package/dist/common/logTracker.js +2 -2
- package/dist/common/logTracker.js.map +1 -1
- package/dist/common/lspUtils.d.ts +1 -1
- package/dist/common/lspUtils.js +3 -4
- package/dist/common/lspUtils.js.map +1 -1
- package/dist/common/memUtils.js +2 -2
- package/dist/common/memUtils.js.map +1 -1
- package/dist/common/pathUtils.js +32 -32
- package/dist/common/pathUtils.js.map +1 -1
- package/dist/common/positionUtils.js +7 -8
- package/dist/common/positionUtils.js.map +1 -1
- package/dist/common/progressReporter.js.map +1 -1
- package/dist/common/pythonVersion.js.map +1 -1
- package/dist/common/realFileSystem.d.ts +0 -2
- package/dist/common/realFileSystem.js +2 -2
- package/dist/common/realFileSystem.js.map +1 -1
- package/dist/common/serviceProvider.js.map +1 -1
- package/dist/common/serviceProviderExtensions.js +1 -2
- package/dist/common/serviceProviderExtensions.js.map +1 -1
- package/dist/common/stringUtils.js +12 -13
- package/dist/common/stringUtils.js.map +1 -1
- package/dist/common/textEditTracker.js.map +1 -1
- package/dist/common/textRange.js +13 -13
- package/dist/common/textRange.js.map +1 -1
- package/dist/common/textRangeCollection.js +2 -2
- package/dist/common/textRangeCollection.js.map +1 -1
- package/dist/common/timing.js.map +1 -1
- package/dist/common/uri/baseUri.js.map +1 -1
- package/dist/common/uri/fileUri.js.map +1 -1
- package/dist/common/uri/memoization.js +3 -4
- package/dist/common/uri/memoization.js.map +1 -1
- package/dist/common/uri/uri.js.map +1 -1
- package/dist/common/uri/uriUtils.d.ts +0 -1
- package/dist/common/uri/uriUtils.js +20 -20
- package/dist/common/uri/uriUtils.js.map +1 -1
- package/dist/common/uri/webUri.js.map +1 -1
- package/dist/common/workspaceEditUtils.js +8 -9
- package/dist/common/workspaceEditUtils.js.map +1 -1
- package/dist/languageServerBase.d.ts +2 -2
- package/dist/languageServerBase.js +5 -2
- package/dist/languageServerBase.js.map +1 -1
- package/dist/languageService/analyzerServiceExecutor.js +30 -29
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -1
- package/dist/languageService/autoImporter.js +4 -4
- package/dist/languageService/autoImporter.js.map +1 -1
- package/dist/languageService/callHierarchyProvider.js.map +1 -1
- package/dist/languageService/codeActionProvider.js.map +1 -1
- package/dist/languageService/completionProvider.js +4 -4
- package/dist/languageService/completionProvider.js.map +1 -1
- package/dist/languageService/completionProviderUtils.js +4 -5
- package/dist/languageService/completionProviderUtils.js.map +1 -1
- package/dist/languageService/definitionProvider.js +5 -5
- package/dist/languageService/definitionProvider.js.map +1 -1
- package/dist/languageService/documentHighlightProvider.js.map +1 -1
- package/dist/languageService/documentSymbolCollector.js +3 -3
- package/dist/languageService/documentSymbolCollector.js.map +1 -1
- package/dist/languageService/documentSymbolProvider.js +2 -2
- package/dist/languageService/documentSymbolProvider.js.map +1 -1
- package/dist/languageService/dynamicFeature.js.map +1 -1
- package/dist/languageService/fileWatcherDynamicFeature.js.map +1 -1
- package/dist/languageService/hoverProvider.js +6 -6
- package/dist/languageService/hoverProvider.js.map +1 -1
- package/dist/languageService/importSorter.js.map +1 -1
- package/dist/languageService/navigationUtils.js +3 -4
- package/dist/languageService/navigationUtils.js.map +1 -1
- package/dist/languageService/quickActions.js +1 -2
- package/dist/languageService/quickActions.js.map +1 -1
- package/dist/languageService/referencesProvider.js.map +1 -1
- package/dist/languageService/renameProvider.js.map +1 -1
- package/dist/languageService/signatureHelpProvider.js.map +1 -1
- package/dist/languageService/symbolIndexer.js.map +1 -1
- package/dist/languageService/tooltipUtils.d.ts +5 -5
- package/dist/languageService/tooltipUtils.js +31 -31
- package/dist/languageService/tooltipUtils.js.map +1 -1
- package/dist/languageService/workspaceSymbolProvider.js.map +1 -1
- package/dist/localization/localize.d.ts +3 -0
- package/dist/localization/localize.js +7 -6
- package/dist/localization/localize.js.map +1 -1
- package/dist/localization/package.nls.en-us.json +2 -1
- package/dist/nodeMain.js +1 -2
- package/dist/nodeMain.js.map +1 -1
- package/dist/nodeServer.js +2 -3
- package/dist/nodeServer.js.map +1 -1
- package/dist/parser/characterStream.js.map +1 -1
- package/dist/parser/characters.js +10 -11
- package/dist/parser/characters.js.map +1 -1
- package/dist/parser/parseNodes.d.ts +8 -8
- package/dist/parser/parseNodes.js +5 -5
- package/dist/parser/parseNodes.js.map +1 -1
- package/dist/parser/parser.js.map +1 -1
- package/dist/parser/stringTokenUtils.js +2 -2
- package/dist/parser/stringTokenUtils.js.map +1 -1
- package/dist/parser/tokenizer.js.map +1 -1
- package/dist/parser/unicode.js +468 -468
- package/dist/parser/unicode.js.map +1 -1
- package/dist/pprof/profiler.js +2 -3
- package/dist/pprof/profiler.js.map +1 -1
- package/dist/pyright.js +22 -23
- package/dist/pyright.js.map +1 -1
- package/dist/pyrightFileSystem.d.ts +0 -2
- package/dist/pyrightFileSystem.js.map +1 -1
- package/dist/readonlyAugmentedFileSystem.d.ts +0 -2
- package/dist/readonlyAugmentedFileSystem.js.map +1 -1
- package/dist/server.js.map +1 -1
- package/dist/tests/cacheManager.test.js.map +1 -1
- package/dist/tests/chainedSourceFiles.test.js.map +1 -1
- package/dist/tests/checker.test.js +13 -5
- package/dist/tests/checker.test.js.map +1 -1
- package/dist/tests/classDeclaration.test.js.map +1 -1
- package/dist/tests/config.test.js +160 -24
- package/dist/tests/config.test.js.map +1 -1
- package/dist/tests/debug.test.js.map +1 -1
- package/dist/tests/diagnosticOverrides.test.js.map +1 -1
- package/dist/tests/docStringConversion.test.js +1 -2
- package/dist/tests/docStringConversion.test.js.map +1 -1
- package/dist/tests/documentSymbolCollector.test.js.map +1 -1
- package/dist/tests/filesystem.test.js.map +1 -1
- package/dist/tests/fourSlashParser.test.js.map +1 -1
- package/dist/tests/fourSlashRunner.test.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.lib.alias.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.comment.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.dunderNew.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.errorNodes.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.import.dunderNames.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.import.exactMatch.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.import.excludeAlreadyImported.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.d.ts +0 -1
- package/dist/tests/fourslash/completions.import.interimFile.fourslash.disabled.js.map +1 -1
- package/dist/tests/fourslash/completions.import.submodule.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.inList.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.included.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.literals.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.default.importStub.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.params.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.private.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.property.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.self.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.triggers.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.triggers.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/completions.with.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -1
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.async.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByBuiltin.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.builtinDocstrings.builtinInheritedByUserCode.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.class.docString.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.stringFormat.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docstring.alias.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docstring.parameter.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.formatted.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.import.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inferred.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.init.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.overloadedFunction.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.slots.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.unpackedTypedDict.key.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.multipart.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.nameconflict.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -1
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.command.trycatchImport.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/noerrors.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.args.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.args.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.function.untitledFile.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.function.untitledFile.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.init.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.init.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.library.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.parens.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.parens.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -1
- package/dist/tests/fourslash/rename.string.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -1
- package/dist/tests/fourslash/shadowedImports.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedFunction.fourslash.js.map +1 -1
- package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.incomingCalls.aliasedVariable.fourslash.js.map +1 -1
- package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.incomingCalls.function.fourslash.js.map +1 -1
- package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction1.fourslash.js.map +1 -1
- package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.aliasedFunction2.fourslash.js.map +1 -1
- package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/showcallhierarchy.outgoingCalls.function.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.dunderNew.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.dunderNew.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.overload.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -1
- package/dist/tests/fourslash/signature.simple.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -1
- package/dist/tests/fourslash/typeVerifier.fourslash.d.ts +0 -1
- package/dist/tests/fourslash/typeVerifier.fourslash.js.map +1 -1
- package/dist/tests/harness/fourslash/fourSlashParser.js +1 -2
- package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -1
- package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -1
- package/dist/tests/harness/fourslash/runner.d.ts +0 -1
- package/dist/tests/harness/fourslash/runner.js +2 -3
- package/dist/tests/harness/fourslash/runner.js.map +1 -1
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -1
- package/dist/tests/harness/fourslash/testState.js +7 -7
- package/dist/tests/harness/fourslash/testState.js.map +1 -1
- package/dist/tests/harness/fourslash/testStateUtils.js +4 -5
- package/dist/tests/harness/fourslash/testStateUtils.js.map +1 -1
- package/dist/tests/harness/fourslash/workspaceEditTestUtils.js +7 -8
- package/dist/tests/harness/fourslash/workspaceEditTestUtils.js.map +1 -1
- package/dist/tests/harness/testHost.js.map +1 -1
- package/dist/tests/harness/utils.d.ts +0 -2
- package/dist/tests/harness/utils.js +7 -7
- package/dist/tests/harness/utils.js.map +1 -1
- package/dist/tests/harness/vfs/factory.js +3 -3
- package/dist/tests/harness/vfs/factory.js.map +1 -1
- package/dist/tests/harness/vfs/filesystem.d.ts +0 -2
- package/dist/tests/harness/vfs/filesystem.js +2 -2
- package/dist/tests/harness/vfs/filesystem.js.map +1 -1
- package/dist/tests/harness/vfs/pathValidation.js +2 -2
- package/dist/tests/harness/vfs/pathValidation.js.map +1 -1
- package/dist/tests/importResolver.test.js.map +1 -1
- package/dist/tests/importStatementUtils.test.js.map +1 -1
- package/dist/tests/ipythonMode.test.js.map +1 -1
- package/dist/tests/languageServer.test.js.map +1 -1
- package/dist/tests/localizer.test.js.map +1 -1
- package/dist/tests/lsp/languageServer.js +1 -2
- package/dist/tests/lsp/languageServer.js.map +1 -1
- package/dist/tests/lsp/languageServerTestUtils.js +14 -14
- package/dist/tests/lsp/languageServerTestUtils.js.map +1 -1
- package/dist/tests/lsp/webpack.testserver.config.d.ts +2 -2
- package/dist/tests/parseTreeUtils.test.js.map +1 -1
- package/dist/tests/pathUtils.test.js.map +1 -1
- package/dist/tests/pyrightFileSystem.test.js.map +1 -1
- package/dist/tests/serialization.test.js +1 -2
- package/dist/tests/serialization.test.js.map +1 -1
- package/dist/tests/sourceMapperUtils.test.js.map +1 -1
- package/dist/tests/testStateUtils.js +5 -6
- package/dist/tests/testStateUtils.js.map +1 -1
- package/dist/tests/testUtils.js +8 -9
- package/dist/tests/testUtils.js.map +1 -1
- package/dist/tests/textEditUtil.test.js.map +1 -1
- package/dist/tests/tokenizer.test.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +7 -7
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator2.test.js +20 -0
- package/dist/tests/typeEvaluator2.test.js.map +1 -1
- package/dist/tests/typeEvaluator3.test.js +6 -2
- package/dist/tests/typeEvaluator3.test.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +3 -3
- package/dist/tests/typeEvaluator5.test.js +1 -1
- package/dist/tests/typeEvaluator6.test.js +17 -9
- package/dist/tests/typeEvaluator6.test.js.map +1 -1
- package/dist/tests/typeEvaluator7.test.js +4 -0
- package/dist/tests/typeEvaluator7.test.js.map +1 -1
- package/dist/tests/typeEvaluator8.test.js +4 -0
- package/dist/tests/typeEvaluator8.test.js.map +1 -1
- package/dist/tests/uri.test.js.map +1 -1
- package/dist/workspaceFactory.js +3 -3
- package/dist/workspaceFactory.js.map +1 -1
- package/package.json +2 -2
- package/dist/analyzer/typeVarContext.d.ts +0 -48
- package/dist/analyzer/typeVarContext.js +0 -288
- package/dist/analyzer/typeVarContext.js.map +0 -1
package/dist/analyzer/types.js
CHANGED
@@ -8,36 +8,58 @@
|
|
8
8
|
* Representation of types used during type analysis within Python.
|
9
9
|
*/
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
11
|
-
exports.
|
12
|
-
exports.
|
11
|
+
exports.TypeVarType = exports.ParamSpecType = exports.TypeVarScopeType = exports.TypeVarKind = exports.Variance = exports.UnionType = exports.TypeCondition = exports.AnyType = exports.NeverType = exports.OverloadedType = exports.FunctionType = exports.FunctionTypeFlags = exports.FunctionParam = exports.FunctionParamFlags = exports.ClassType = exports.ClassTypeFlags = exports.ModuleType = exports.UnknownType = exports.UnboundType = exports.TypeBase = exports.maxTypeRecursionCount = exports.EnumLiteral = exports.UnificationScopeId = exports.TypeFlags = exports.TypeCategory = void 0;
|
12
|
+
exports.isPositionOnlySeparator = isPositionOnlySeparator;
|
13
|
+
exports.isKeywordOnlySeparator = isKeywordOnlySeparator;
|
14
|
+
exports.isNever = isNever;
|
15
|
+
exports.isAny = isAny;
|
16
|
+
exports.isUnknown = isUnknown;
|
17
|
+
exports.isAnyOrUnknown = isAnyOrUnknown;
|
18
|
+
exports.isUnbound = isUnbound;
|
19
|
+
exports.isUnion = isUnion;
|
20
|
+
exports.isPossiblyUnbound = isPossiblyUnbound;
|
21
|
+
exports.isClass = isClass;
|
22
|
+
exports.isInstantiableClass = isInstantiableClass;
|
23
|
+
exports.isClassInstance = isClassInstance;
|
24
|
+
exports.isModule = isModule;
|
25
|
+
exports.isTypeVar = isTypeVar;
|
26
|
+
exports.isParamSpec = isParamSpec;
|
27
|
+
exports.isTypeVarTuple = isTypeVarTuple;
|
28
|
+
exports.isUnpackedTypeVarTuple = isUnpackedTypeVarTuple;
|
29
|
+
exports.isUnpackedClass = isUnpackedClass;
|
30
|
+
exports.isUnpacked = isUnpacked;
|
31
|
+
exports.isFunction = isFunction;
|
32
|
+
exports.isOverloaded = isOverloaded;
|
33
|
+
exports.getTypeAliasInfo = getTypeAliasInfo;
|
34
|
+
exports.isTypeSame = isTypeSame;
|
35
|
+
exports.removeUnknownFromUnion = removeUnknownFromUnion;
|
36
|
+
exports.removeUnbound = removeUnbound;
|
37
|
+
exports.removeFromUnion = removeFromUnion;
|
38
|
+
exports.findSubtype = findSubtype;
|
39
|
+
exports.combineTypes = combineTypes;
|
40
|
+
exports.isSameWithoutLiteralValue = isSameWithoutLiteralValue;
|
13
41
|
const debug_1 = require("../common/debug");
|
14
42
|
var TypeCategory;
|
15
43
|
(function (TypeCategory) {
|
16
|
-
// Name is not bound to a value of any type
|
44
|
+
// Name is not bound to a value of any type
|
17
45
|
TypeCategory[TypeCategory["Unbound"] = 0] = "Unbound";
|
18
|
-
//
|
19
|
-
// type analyzer (e.g. there is no available typings file).
|
20
|
-
// Unknown types are treated the same as "Any" at analysis time.
|
46
|
+
// Implicit Any type
|
21
47
|
TypeCategory[TypeCategory["Unknown"] = 1] = "Unknown";
|
22
|
-
// Type can be anything
|
48
|
+
// Type can be anything
|
23
49
|
TypeCategory[TypeCategory["Any"] = 2] = "Any";
|
24
|
-
//
|
25
|
-
// subtypes in a union have been eliminated, and execution
|
26
|
-
// should never get to this point.
|
50
|
+
// The bottom type, equivalent to an empty union
|
27
51
|
TypeCategory[TypeCategory["Never"] = 3] = "Never";
|
28
|
-
// Callable type
|
52
|
+
// Callable type
|
29
53
|
TypeCategory[TypeCategory["Function"] = 4] = "Function";
|
30
|
-
// Functions defined with @overload decorator
|
31
|
-
|
32
|
-
|
33
|
-
// Class definition, including associated instance methods,
|
34
|
-
// class methods, static methods, properties, and variables.
|
54
|
+
// Functions defined with @overload decorator
|
55
|
+
TypeCategory[TypeCategory["Overloaded"] = 5] = "Overloaded";
|
56
|
+
// Class definition
|
35
57
|
TypeCategory[TypeCategory["Class"] = 6] = "Class";
|
36
|
-
// Module instance
|
58
|
+
// Module instance
|
37
59
|
TypeCategory[TypeCategory["Module"] = 7] = "Module";
|
38
|
-
//
|
60
|
+
// Union of two or more other types
|
39
61
|
TypeCategory[TypeCategory["Union"] = 8] = "Union";
|
40
|
-
// Type variable
|
62
|
+
// Type variable
|
41
63
|
TypeCategory[TypeCategory["TypeVar"] = 9] = "TypeVar";
|
42
64
|
})(TypeCategory || (exports.TypeCategory = TypeCategory = {}));
|
43
65
|
var TypeFlags;
|
@@ -54,13 +76,16 @@ var TypeFlags;
|
|
54
76
|
// when comparing two types for equivalence.
|
55
77
|
TypeFlags[TypeFlags["TypeCompatibilityMask"] = 3] = "TypeCompatibilityMask";
|
56
78
|
})(TypeFlags || (exports.TypeFlags = TypeFlags = {}));
|
57
|
-
exports.
|
79
|
+
exports.UnificationScopeId = '-';
|
80
|
+
// Information about an enum member that can be used within a Literal
|
81
|
+
// type annotation.
|
58
82
|
class EnumLiteral {
|
59
|
-
constructor(classFullName, className, itemName, itemType) {
|
83
|
+
constructor(classFullName, className, itemName, itemType, isReprEnum) {
|
60
84
|
this.classFullName = classFullName;
|
61
85
|
this.className = className;
|
62
86
|
this.itemName = itemName;
|
63
87
|
this.itemType = itemType;
|
88
|
+
this.isReprEnum = isReprEnum;
|
64
89
|
}
|
65
90
|
getName() {
|
66
91
|
return `${this.classFullName}.${this.itemName}`;
|
@@ -186,19 +211,9 @@ var TypeBase;
|
|
186
211
|
return newInstance;
|
187
212
|
}
|
188
213
|
TypeBase.cloneTypeAsInstantiable = cloneTypeAsInstantiable;
|
189
|
-
function cloneForTypeAlias(type,
|
214
|
+
function cloneForTypeAlias(type, aliasInfo) {
|
190
215
|
const typeClone = cloneType(type);
|
191
|
-
TypeBase.setTypeAliasInfo(typeClone,
|
192
|
-
name,
|
193
|
-
fullName,
|
194
|
-
moduleName,
|
195
|
-
fileUri,
|
196
|
-
typeVarScopeId,
|
197
|
-
isPep695Syntax,
|
198
|
-
typeParams: typeParams,
|
199
|
-
usageVariance: undefined,
|
200
|
-
typeArgs: typeArgs,
|
201
|
-
});
|
216
|
+
TypeBase.setTypeAliasInfo(typeClone, aliasInfo);
|
202
217
|
return typeClone;
|
203
218
|
}
|
204
219
|
TypeBase.cloneForTypeAlias = cloneForTypeAlias;
|
@@ -395,8 +410,7 @@ var ClassTypeFlags;
|
|
395
410
|
// class is generic, and therefore supports standard subscripting
|
396
411
|
// semantics.
|
397
412
|
ClassTypeFlags[ClassTypeFlags["HasCustomClassGetItem"] = 16384] = "HasCustomClassGetItem";
|
398
|
-
// The tuple class
|
399
|
-
// special-case handling of its type arguments.
|
413
|
+
// The tuple class requires special-case handling for its type arguments.
|
400
414
|
ClassTypeFlags[ClassTypeFlags["TupleClass"] = 32768] = "TupleClass";
|
401
415
|
// The class has a metaclass of EnumMeta or derives from
|
402
416
|
// a class that has this metaclass.
|
@@ -668,8 +682,9 @@ var ClassType;
|
|
668
682
|
}
|
669
683
|
if (className !== undefined) {
|
670
684
|
const classArray = Array.isArray(className) ? className : [className];
|
671
|
-
return
|
672
|
-
|
685
|
+
return classArray.some((name) => name === classType.shared.name ||
|
686
|
+
name === classType.shared.fullName ||
|
687
|
+
name === classType.priv.aliasName);
|
673
688
|
}
|
674
689
|
return true;
|
675
690
|
}
|
@@ -969,7 +984,7 @@ var FunctionParamFlags;
|
|
969
984
|
var FunctionParam;
|
970
985
|
(function (FunctionParam) {
|
971
986
|
function create(category, type, flags = FunctionParamFlags.None, name, defaultType) {
|
972
|
-
return { category,
|
987
|
+
return { category, flags, name, _type: type, _defaultType: defaultType };
|
973
988
|
}
|
974
989
|
FunctionParam.create = create;
|
975
990
|
function isNameSynthesized(param) {
|
@@ -989,12 +1004,10 @@ function isPositionOnlySeparator(param) {
|
|
989
1004
|
// A simple parameter with no name is treated as a "/" separator.
|
990
1005
|
return param.category === 0 /* ParamCategory.Simple */ && !param.name;
|
991
1006
|
}
|
992
|
-
exports.isPositionOnlySeparator = isPositionOnlySeparator;
|
993
1007
|
function isKeywordOnlySeparator(param) {
|
994
1008
|
// An *args parameter with no name is treated as a "*" separator.
|
995
1009
|
return param.category === 1 /* ParamCategory.ArgsList */ && !param.name;
|
996
1010
|
}
|
997
|
-
exports.isKeywordOnlySeparator = isKeywordOnlySeparator;
|
998
1011
|
var FunctionTypeFlags;
|
999
1012
|
(function (FunctionTypeFlags) {
|
1000
1013
|
FunctionTypeFlags[FunctionTypeFlags["None"] = 0] = "None";
|
@@ -1092,14 +1105,16 @@ var FunctionType;
|
|
1092
1105
|
}
|
1093
1106
|
// Creates a deep copy of the function type, including a fresh
|
1094
1107
|
// version of _functionDetails.
|
1095
|
-
function clone(type, stripFirstParam = false, boundToType
|
1108
|
+
function clone(type, stripFirstParam = false, boundToType) {
|
1096
1109
|
var _a, _b;
|
1097
1110
|
const newFunction = TypeBase.cloneType(type);
|
1098
1111
|
newFunction.shared = { ...type.shared };
|
1099
1112
|
newFunction.priv.preBoundFlags = newFunction.shared.flags;
|
1100
1113
|
newFunction.priv.boundToType = boundToType;
|
1101
|
-
if (
|
1102
|
-
|
1114
|
+
if (boundToType) {
|
1115
|
+
if (type.shared.name === '__new__' || type.shared.name === '__init__') {
|
1116
|
+
newFunction.priv.constructorTypeVarScopeId = boundToType.shared.typeVarScopeId;
|
1117
|
+
}
|
1103
1118
|
}
|
1104
1119
|
if (stripFirstParam) {
|
1105
1120
|
if (type.shared.parameters.length > 0) {
|
@@ -1107,7 +1122,7 @@ var FunctionType;
|
|
1107
1122
|
if (type.shared.parameters.length > 0 && !FunctionParam.isTypeInferred(type.shared.parameters[0])) {
|
1108
1123
|
// Stash away the effective type of the first parameter if it
|
1109
1124
|
// wasn't synthesized.
|
1110
|
-
newFunction.priv.strippedFirstParamType =
|
1125
|
+
newFunction.priv.strippedFirstParamType = getParamType(type, 0);
|
1111
1126
|
}
|
1112
1127
|
newFunction.shared.parameters = type.shared.parameters.slice(1);
|
1113
1128
|
}
|
@@ -1128,9 +1143,9 @@ var FunctionType;
|
|
1128
1143
|
parameterTypes: stripFirstParam
|
1129
1144
|
? type.priv.specializedTypes.parameterTypes.slice(1)
|
1130
1145
|
: type.priv.specializedTypes.parameterTypes,
|
1131
|
-
|
1132
|
-
? (_b = type.priv.specializedTypes.
|
1133
|
-
: type.priv.specializedTypes.
|
1146
|
+
parameterDefaultTypes: stripFirstParam
|
1147
|
+
? (_b = type.priv.specializedTypes.parameterDefaultTypes) === null || _b === void 0 ? void 0 : _b.slice(1)
|
1148
|
+
: type.priv.specializedTypes.parameterDefaultTypes,
|
1134
1149
|
returnType: type.priv.specializedTypes.returnType,
|
1135
1150
|
};
|
1136
1151
|
}
|
@@ -1165,8 +1180,8 @@ var FunctionType;
|
|
1165
1180
|
function specialize(type, specializedTypes, specializedInferredReturnType) {
|
1166
1181
|
const newFunction = TypeBase.cloneType(type);
|
1167
1182
|
(0, debug_1.assert)(specializedTypes.parameterTypes.length === type.shared.parameters.length);
|
1168
|
-
if (specializedTypes.
|
1169
|
-
(0, debug_1.assert)(specializedTypes.
|
1183
|
+
if (specializedTypes.parameterDefaultTypes) {
|
1184
|
+
(0, debug_1.assert)(specializedTypes.parameterDefaultTypes.length === type.shared.parameters.length);
|
1170
1185
|
}
|
1171
1186
|
newFunction.priv.specializedTypes = specializedTypes;
|
1172
1187
|
newFunction.priv.inferredReturnType = specializedInferredReturnType;
|
@@ -1185,8 +1200,8 @@ var FunctionType;
|
|
1185
1200
|
const prevParams = Array.from(newFunction.shared.parameters);
|
1186
1201
|
newFunction.shared.parameters = [
|
1187
1202
|
...prevParams,
|
1188
|
-
...paramSpecValue.shared.parameters.map((param) => {
|
1189
|
-
return FunctionParam.create(param.category,
|
1203
|
+
...paramSpecValue.shared.parameters.map((param, index) => {
|
1204
|
+
return FunctionParam.create(param.category, FunctionType.getParamType(paramSpecValue, index), (param.flags & FunctionParamFlags.NameSynthesized) | FunctionParamFlags.TypeDeclared, param.name, FunctionType.getParamDefaultType(paramSpecValue, index));
|
1190
1205
|
}),
|
1191
1206
|
];
|
1192
1207
|
if (newFunction.shared.docString === undefined) {
|
@@ -1216,16 +1231,14 @@ var FunctionType;
|
|
1216
1231
|
// Update the specialized parameter types as well.
|
1217
1232
|
const specializedTypes = newFunction.priv.specializedTypes;
|
1218
1233
|
if (specializedTypes) {
|
1219
|
-
paramSpecValue.shared.parameters.forEach((
|
1234
|
+
paramSpecValue.shared.parameters.forEach((_, index) => {
|
1220
1235
|
var _a;
|
1221
|
-
specializedTypes.parameterTypes.push(
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1236
|
+
specializedTypes.parameterTypes.push(FunctionType.getParamType(paramSpecValue, index));
|
1237
|
+
if (specializedTypes.parameterDefaultTypes) {
|
1238
|
+
(_a = specializedTypes.parameterDefaultTypes) === null || _a === void 0 ? void 0 : _a.push(FunctionType.getParamDefaultType(paramSpecValue, index));
|
1239
|
+
}
|
1225
1240
|
});
|
1226
1241
|
}
|
1227
|
-
FunctionType.addHigherOrderTypeVarScopeIds(newFunction, paramSpecValue.shared.typeVarScopeId);
|
1228
|
-
FunctionType.addHigherOrderTypeVarScopeIds(newFunction, paramSpecValue.priv.higherOrderTypeVarScopeIds);
|
1229
1242
|
newFunction.priv.constructorTypeVarScopeId = paramSpecValue.priv.constructorTypeVarScopeId;
|
1230
1243
|
if (!newFunction.shared.methodClass && paramSpecValue.shared.methodClass) {
|
1231
1244
|
newFunction.shared.methodClass = paramSpecValue.shared.methodClass;
|
@@ -1248,7 +1261,6 @@ var FunctionType;
|
|
1248
1261
|
newFunction.shared.typeVarScopeId = newScopeId;
|
1249
1262
|
newFunction.priv.constructorTypeVarScopeId = newConstructorScopeId;
|
1250
1263
|
newFunction.shared.typeParams = typeParams;
|
1251
|
-
FunctionType.addHigherOrderTypeVarScopeIds(newFunction, typeParams.map((t) => { var _a, _b; return (_b = (_a = t.priv.externalTypeVar) === null || _a === void 0 ? void 0 : _a.priv.scopeId) !== null && _b !== void 0 ? _b : t.priv.scopeId; }));
|
1252
1264
|
return newFunction;
|
1253
1265
|
}
|
1254
1266
|
FunctionType.cloneWithNewTypeVarScopeId = cloneWithNewTypeVarScopeId;
|
@@ -1282,8 +1294,8 @@ var FunctionType;
|
|
1282
1294
|
if (argsParam.category !== 1 /* ParamCategory.ArgsList */ || kwargsParam.category !== 2 /* ParamCategory.KwargsDict */) {
|
1283
1295
|
return type;
|
1284
1296
|
}
|
1285
|
-
const argsType = FunctionType.
|
1286
|
-
const kwargsType = FunctionType.
|
1297
|
+
const argsType = FunctionType.getParamType(type, paramCount - 2);
|
1298
|
+
const kwargsType = FunctionType.getParamType(type, paramCount - 1);
|
1287
1299
|
if (!isParamSpec(argsType) || !isParamSpec(kwargsType) || !isTypeSame(argsType, kwargsType)) {
|
1288
1300
|
return type;
|
1289
1301
|
}
|
@@ -1304,9 +1316,9 @@ var FunctionType;
|
|
1304
1316
|
if (type.priv.specializedTypes) {
|
1305
1317
|
newFunction.priv.specializedTypes = { ...type.priv.specializedTypes };
|
1306
1318
|
newFunction.priv.specializedTypes.parameterTypes = newFunction.priv.specializedTypes.parameterTypes.slice(0, newFunction.priv.specializedTypes.parameterTypes.length - paramsToDrop);
|
1307
|
-
if (newFunction.priv.specializedTypes.
|
1308
|
-
newFunction.priv.specializedTypes.
|
1309
|
-
newFunction.priv.specializedTypes.
|
1319
|
+
if (newFunction.priv.specializedTypes.parameterDefaultTypes) {
|
1320
|
+
newFunction.priv.specializedTypes.parameterDefaultTypes =
|
1321
|
+
newFunction.priv.specializedTypes.parameterDefaultTypes.slice(0, newFunction.priv.specializedTypes.parameterDefaultTypes.length - paramsToDrop);
|
1310
1322
|
}
|
1311
1323
|
}
|
1312
1324
|
if (type.priv.inferredReturnType) {
|
@@ -1323,14 +1335,16 @@ var FunctionType;
|
|
1323
1335
|
return undefined;
|
1324
1336
|
}
|
1325
1337
|
const secondLastParam = params[params.length - 2];
|
1338
|
+
const secondLastParamType = FunctionType.getParamType(type, params.length - 2);
|
1326
1339
|
const lastParam = params[params.length - 1];
|
1340
|
+
const lastParamType = FunctionType.getParamType(type, params.length - 1);
|
1327
1341
|
if (secondLastParam.category === 1 /* ParamCategory.ArgsList */ &&
|
1328
|
-
isParamSpec(
|
1329
|
-
|
1342
|
+
isParamSpec(secondLastParamType) &&
|
1343
|
+
secondLastParamType.priv.paramSpecAccess === 'args' &&
|
1330
1344
|
lastParam.category === 2 /* ParamCategory.KwargsDict */ &&
|
1331
|
-
isParamSpec(
|
1332
|
-
|
1333
|
-
return TypeVarType.cloneForParamSpecAccess(
|
1345
|
+
isParamSpec(lastParamType) &&
|
1346
|
+
lastParamType.priv.paramSpecAccess === 'kwargs') {
|
1347
|
+
return TypeVarType.cloneForParamSpecAccess(secondLastParamType, /* access */ undefined);
|
1334
1348
|
}
|
1335
1349
|
return undefined;
|
1336
1350
|
}
|
@@ -1346,27 +1360,6 @@ var FunctionType;
|
|
1346
1360
|
});
|
1347
1361
|
}
|
1348
1362
|
FunctionType.addDefaultParams = addDefaultParams;
|
1349
|
-
function addHigherOrderTypeVarScopeIds(functionType, scopeIds) {
|
1350
|
-
if (!scopeIds) {
|
1351
|
-
return;
|
1352
|
-
}
|
1353
|
-
if (!Array.isArray(scopeIds)) {
|
1354
|
-
scopeIds = [scopeIds];
|
1355
|
-
}
|
1356
|
-
if (!functionType.priv.higherOrderTypeVarScopeIds) {
|
1357
|
-
functionType.priv.higherOrderTypeVarScopeIds = [];
|
1358
|
-
}
|
1359
|
-
// Add the scope IDs to the function if they're unique.
|
1360
|
-
scopeIds.forEach((scopeId) => {
|
1361
|
-
if (!scopeId || scopeId === functionType.shared.typeVarScopeId) {
|
1362
|
-
return;
|
1363
|
-
}
|
1364
|
-
if (!functionType.priv.higherOrderTypeVarScopeIds.some((id) => id === scopeId)) {
|
1365
|
-
functionType.priv.higherOrderTypeVarScopeIds.push(scopeId);
|
1366
|
-
}
|
1367
|
-
});
|
1368
|
-
}
|
1369
|
-
FunctionType.addHigherOrderTypeVarScopeIds = addHigherOrderTypeVarScopeIds;
|
1370
1363
|
function getDefaultParams(useUnknown = false) {
|
1371
1364
|
return [
|
1372
1365
|
FunctionParam.create(1 /* ParamCategory.ArgsList */, useUnknown ? UnknownType.create() : AnyType.create(), useUnknown ? FunctionParamFlags.None : FunctionParamFlags.TypeDeclared, 'args'),
|
@@ -1393,7 +1386,7 @@ var FunctionType;
|
|
1393
1386
|
else if (param.category === 2 /* ParamCategory.KwargsDict */) {
|
1394
1387
|
sawKwargs = true;
|
1395
1388
|
}
|
1396
|
-
if (!isAnyOrUnknown(FunctionType.
|
1389
|
+
if (!isAnyOrUnknown(FunctionType.getParamType(functionType, i))) {
|
1397
1390
|
return false;
|
1398
1391
|
}
|
1399
1392
|
}
|
@@ -1486,36 +1479,40 @@ var FunctionType;
|
|
1486
1479
|
}
|
1487
1480
|
if (name !== undefined) {
|
1488
1481
|
const functionArray = Array.isArray(name) ? name : [name];
|
1489
|
-
return functionArray.some((name) => name === type.shared.name);
|
1482
|
+
return functionArray.some((name) => name === type.shared.name || name === type.shared.fullName);
|
1490
1483
|
}
|
1491
1484
|
return true;
|
1492
1485
|
}
|
1493
1486
|
FunctionType.isBuiltIn = isBuiltIn;
|
1494
|
-
function
|
1487
|
+
function getDeclaredParamType(type, index) {
|
1488
|
+
return type.shared.parameters[index]._type;
|
1489
|
+
}
|
1490
|
+
FunctionType.getDeclaredParamType = getDeclaredParamType;
|
1491
|
+
function getParamType(type, index) {
|
1495
1492
|
(0, debug_1.assert)(index < type.shared.parameters.length, 'Parameter types array overflow');
|
1496
1493
|
if (type.priv.specializedTypes && index < type.priv.specializedTypes.parameterTypes.length) {
|
1497
1494
|
return type.priv.specializedTypes.parameterTypes[index];
|
1498
1495
|
}
|
1499
|
-
return type.shared.parameters[index].
|
1496
|
+
return type.shared.parameters[index]._type;
|
1500
1497
|
}
|
1501
|
-
FunctionType.
|
1502
|
-
function
|
1498
|
+
FunctionType.getParamType = getParamType;
|
1499
|
+
function getParamDefaultType(type, index) {
|
1503
1500
|
var _a;
|
1504
1501
|
(0, debug_1.assert)(index < type.shared.parameters.length, 'Parameter types array overflow');
|
1505
|
-
if (((_a = type.priv.specializedTypes) === null || _a === void 0 ? void 0 : _a.
|
1506
|
-
index < type.priv.specializedTypes.
|
1507
|
-
const defaultArgType = type.priv.specializedTypes.
|
1502
|
+
if (((_a = type.priv.specializedTypes) === null || _a === void 0 ? void 0 : _a.parameterDefaultTypes) &&
|
1503
|
+
index < type.priv.specializedTypes.parameterDefaultTypes.length) {
|
1504
|
+
const defaultArgType = type.priv.specializedTypes.parameterDefaultTypes[index];
|
1508
1505
|
if (defaultArgType) {
|
1509
1506
|
return defaultArgType;
|
1510
1507
|
}
|
1511
1508
|
}
|
1512
|
-
return type.shared.parameters[index].
|
1509
|
+
return type.shared.parameters[index]._defaultType;
|
1513
1510
|
}
|
1514
|
-
FunctionType.
|
1511
|
+
FunctionType.getParamDefaultType = getParamDefaultType;
|
1515
1512
|
function addParam(type, param) {
|
1516
1513
|
type.shared.parameters.push(param);
|
1517
1514
|
if (type.priv.specializedTypes) {
|
1518
|
-
type.priv.specializedTypes.parameterTypes.push(param.
|
1515
|
+
type.priv.specializedTypes.parameterTypes.push(param._type);
|
1519
1516
|
}
|
1520
1517
|
}
|
1521
1518
|
FunctionType.addParam = addParam;
|
@@ -1542,40 +1539,41 @@ var FunctionType;
|
|
1542
1539
|
}
|
1543
1540
|
FunctionType.getEffectiveReturnType = getEffectiveReturnType;
|
1544
1541
|
})(FunctionType || (exports.FunctionType = FunctionType = {}));
|
1545
|
-
var
|
1546
|
-
(function (
|
1547
|
-
function create(overloads) {
|
1542
|
+
var OverloadedType;
|
1543
|
+
(function (OverloadedType) {
|
1544
|
+
function create(overloads, implementation) {
|
1548
1545
|
const newType = {
|
1549
|
-
category: 5 /* TypeCategory.
|
1546
|
+
category: 5 /* TypeCategory.Overloaded */,
|
1550
1547
|
flags: 2 /* TypeFlags.Instance */,
|
1551
1548
|
props: undefined,
|
1552
1549
|
cached: undefined,
|
1553
1550
|
shared: undefined,
|
1554
1551
|
priv: {
|
1555
|
-
|
1552
|
+
_overloads: [],
|
1553
|
+
_implementation: implementation,
|
1556
1554
|
},
|
1557
1555
|
};
|
1558
1556
|
overloads.forEach((overload) => {
|
1559
|
-
|
1557
|
+
OverloadedType.addOverload(newType, overload);
|
1560
1558
|
});
|
1561
1559
|
return newType;
|
1562
1560
|
}
|
1563
|
-
|
1561
|
+
OverloadedType.create = create;
|
1564
1562
|
// Adds a new overload or an implementation.
|
1565
1563
|
function addOverload(type, functionType) {
|
1566
1564
|
functionType.priv.overloaded = type;
|
1567
|
-
type.priv.
|
1565
|
+
type.priv._overloads.push(functionType);
|
1568
1566
|
}
|
1569
|
-
|
1567
|
+
OverloadedType.addOverload = addOverload;
|
1570
1568
|
function getOverloads(type) {
|
1571
|
-
return type.priv.
|
1569
|
+
return type.priv._overloads;
|
1572
1570
|
}
|
1573
|
-
|
1571
|
+
OverloadedType.getOverloads = getOverloads;
|
1574
1572
|
function getImplementation(type) {
|
1575
|
-
return type.priv.
|
1573
|
+
return type.priv._implementation;
|
1576
1574
|
}
|
1577
|
-
|
1578
|
-
})(
|
1575
|
+
OverloadedType.getImplementation = getImplementation;
|
1576
|
+
})(OverloadedType || (exports.OverloadedType = OverloadedType = {}));
|
1579
1577
|
var NeverType;
|
1580
1578
|
(function (NeverType) {
|
1581
1579
|
const _neverInstance = {
|
@@ -1895,8 +1893,8 @@ var TypeVarType;
|
|
1895
1893
|
if ((_b = newInstance.props) === null || _b === void 0 ? void 0 : _b.specialForm) {
|
1896
1894
|
TypeBase.setSpecialForm(newInstance, undefined);
|
1897
1895
|
}
|
1898
|
-
if (newInstance.priv.
|
1899
|
-
newInstance.priv.
|
1896
|
+
if (newInstance.priv.freeTypeVar) {
|
1897
|
+
newInstance.priv.freeTypeVar = TypeVarType.cloneAsInstance(newInstance.priv.freeTypeVar);
|
1900
1898
|
}
|
1901
1899
|
return newInstance;
|
1902
1900
|
}
|
@@ -1907,8 +1905,8 @@ var TypeVarType;
|
|
1907
1905
|
return type.cached.typeBaseInstantiableType;
|
1908
1906
|
}
|
1909
1907
|
const newInstance = TypeBase.cloneTypeAsInstantiable(type, /* cache */ true);
|
1910
|
-
if (newInstance.priv.
|
1911
|
-
newInstance.priv.
|
1908
|
+
if (newInstance.priv.freeTypeVar) {
|
1909
|
+
newInstance.priv.freeTypeVar = TypeVarType.cloneAsInstantiable(newInstance.priv.freeTypeVar);
|
1912
1910
|
}
|
1913
1911
|
return newInstance;
|
1914
1912
|
}
|
@@ -1934,26 +1932,26 @@ var TypeVarType;
|
|
1934
1932
|
TypeVarType.cloneForScopeId = cloneForScopeId;
|
1935
1933
|
function cloneForUnpacked(type, isInUnion = false) {
|
1936
1934
|
const newInstance = TypeBase.cloneType(type);
|
1937
|
-
newInstance.priv.
|
1938
|
-
newInstance.priv.
|
1939
|
-
if (newInstance.priv.
|
1940
|
-
newInstance.priv.
|
1935
|
+
newInstance.priv.isUnpacked = true;
|
1936
|
+
newInstance.priv.isInUnion = isInUnion;
|
1937
|
+
if (newInstance.priv.freeTypeVar) {
|
1938
|
+
newInstance.priv.freeTypeVar = TypeVarType.cloneForUnpacked(newInstance.priv.freeTypeVar, isInUnion);
|
1941
1939
|
}
|
1942
1940
|
return newInstance;
|
1943
1941
|
}
|
1944
1942
|
TypeVarType.cloneForUnpacked = cloneForUnpacked;
|
1945
1943
|
function cloneForPacked(type) {
|
1946
1944
|
const newInstance = TypeBase.cloneType(type);
|
1947
|
-
newInstance.priv.
|
1948
|
-
newInstance.priv.
|
1949
|
-
if (newInstance.priv.
|
1950
|
-
newInstance.priv.
|
1945
|
+
newInstance.priv.isUnpacked = false;
|
1946
|
+
newInstance.priv.isInUnion = false;
|
1947
|
+
if (newInstance.priv.freeTypeVar) {
|
1948
|
+
newInstance.priv.freeTypeVar = TypeVarType.cloneForPacked(newInstance.priv.freeTypeVar);
|
1951
1949
|
}
|
1952
1950
|
return newInstance;
|
1953
1951
|
}
|
1954
1952
|
TypeVarType.cloneForPacked = cloneForPacked;
|
1955
1953
|
// Creates a "simplified" version of the TypeVar with invariance
|
1956
|
-
// and no bound or constraints. ParamSpecs and
|
1954
|
+
// and no bound or constraints. ParamSpecs and TypeVarTuples are left
|
1957
1955
|
// unmodified. So are auto-variant type variables.
|
1958
1956
|
function cloneAsInvariant(type) {
|
1959
1957
|
if (isParamSpec(type) || isTypeVarTuple(type)) {
|
@@ -1963,7 +1961,7 @@ var TypeVarType;
|
|
1963
1961
|
return type;
|
1964
1962
|
}
|
1965
1963
|
if (type.shared.declaredVariance === 2 /* Variance.Invariant */) {
|
1966
|
-
if (type
|
1964
|
+
if (!TypeVarType.hasBound(type) && !TypeVarType.hasConstraints(type)) {
|
1967
1965
|
return type;
|
1968
1966
|
}
|
1969
1967
|
}
|
@@ -1982,15 +1980,15 @@ var TypeVarType;
|
|
1982
1980
|
}
|
1983
1981
|
TypeVarType.cloneForParamSpecAccess = cloneForParamSpecAccess;
|
1984
1982
|
function cloneAsSpecializedSelf(type, specializedBoundType) {
|
1985
|
-
(0, debug_1.assert)(type
|
1983
|
+
(0, debug_1.assert)(TypeVarType.isSelf(type));
|
1986
1984
|
const newInstance = TypeBase.cloneType(type);
|
1987
1985
|
newInstance.shared = { ...newInstance.shared };
|
1988
1986
|
newInstance.shared.boundType = specializedBoundType;
|
1989
1987
|
return newInstance;
|
1990
1988
|
}
|
1991
1989
|
TypeVarType.cloneAsSpecializedSelf = cloneAsSpecializedSelf;
|
1992
|
-
function
|
1993
|
-
if (type
|
1990
|
+
function cloneAsUnificationVar(type, usageOffset) {
|
1991
|
+
if (TypeVarType.isUnification(type)) {
|
1994
1992
|
return type;
|
1995
1993
|
}
|
1996
1994
|
// If the caller specified a usage offset, append it to the TypeVar
|
@@ -2002,36 +2000,47 @@ var TypeVarType;
|
|
2002
2000
|
newNameWithScope = `${type.priv.nameWithScope}-${usageOffset}`;
|
2003
2001
|
}
|
2004
2002
|
const newInstance = TypeBase.cloneType(type);
|
2005
|
-
newInstance.priv.
|
2006
|
-
newInstance.priv.scopeId = exports.
|
2003
|
+
newInstance.priv.isUnificationVar = true;
|
2004
|
+
newInstance.priv.scopeId = exports.UnificationScopeId;
|
2007
2005
|
newInstance.priv.nameWithScope = newNameWithScope;
|
2008
2006
|
return newInstance;
|
2009
2007
|
}
|
2010
|
-
TypeVarType.
|
2008
|
+
TypeVarType.cloneAsUnificationVar = cloneAsUnificationVar;
|
2011
2009
|
function makeNameWithScope(name, scopeId) {
|
2012
2010
|
return `${name}.${scopeId}`;
|
2013
2011
|
}
|
2014
2012
|
TypeVarType.makeNameWithScope = makeNameWithScope;
|
2015
|
-
function
|
2013
|
+
function makeBoundScopeId(scopeId) {
|
2016
2014
|
if (!scopeId) {
|
2017
2015
|
return undefined;
|
2018
2016
|
}
|
2017
|
+
// Append an asterisk to denote a bound scope.
|
2019
2018
|
return `${scopeId}*`;
|
2020
2019
|
}
|
2021
|
-
TypeVarType.
|
2022
|
-
function
|
2023
|
-
if (type.priv.scopeId === undefined || type.priv.
|
2020
|
+
TypeVarType.makeBoundScopeId = makeBoundScopeId;
|
2021
|
+
function cloneAsBound(type) {
|
2022
|
+
if (type.priv.scopeId === undefined || type.priv.freeTypeVar) {
|
2024
2023
|
return type;
|
2025
2024
|
}
|
2026
|
-
const clone = TypeVarType.cloneForScopeId(type, TypeVarType.
|
2027
|
-
clone.priv.
|
2025
|
+
const clone = TypeVarType.cloneForScopeId(type, TypeVarType.makeBoundScopeId(type.priv.scopeId), type.priv.scopeName, type.priv.scopeType);
|
2026
|
+
clone.priv.freeTypeVar = type;
|
2028
2027
|
return clone;
|
2029
2028
|
}
|
2030
|
-
TypeVarType.
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2029
|
+
TypeVarType.cloneAsBound = cloneAsBound;
|
2030
|
+
// Indicates that the type var is a "free" or unbound type var. Free
|
2031
|
+
// type variables can be solved whereas bound type vars are already bound
|
2032
|
+
// to a value.
|
2033
|
+
function isBound(type) {
|
2034
|
+
// If the type var has an associated free type var, then it's
|
2035
|
+
// considered bound. If it has no associated free var, then it's
|
2036
|
+
// considered free.
|
2037
|
+
return !!type.priv.freeTypeVar;
|
2038
|
+
}
|
2039
|
+
TypeVarType.isBound = isBound;
|
2040
|
+
function isUnification(type) {
|
2041
|
+
return type.priv.isUnificationVar;
|
2042
|
+
}
|
2043
|
+
TypeVarType.isUnification = isUnification;
|
2035
2044
|
function create(name, kind, typeFlags) {
|
2036
2045
|
const newTypeVarType = {
|
2037
2046
|
category: 9 /* TypeCategory.TypeVar */,
|
@@ -2092,19 +2101,28 @@ var TypeVarType;
|
|
2092
2101
|
return !!type.shared.recursiveAlias && !type.shared.boundType;
|
2093
2102
|
}
|
2094
2103
|
TypeVarType.isTypeAliasPlaceholder = isTypeAliasPlaceholder;
|
2104
|
+
function isSelf(type) {
|
2105
|
+
return !!type.shared.isSynthesizedSelf;
|
2106
|
+
}
|
2107
|
+
TypeVarType.isSelf = isSelf;
|
2108
|
+
function hasConstraints(type) {
|
2109
|
+
return type.shared.constraints.length > 0;
|
2110
|
+
}
|
2111
|
+
TypeVarType.hasConstraints = hasConstraints;
|
2112
|
+
function hasBound(type) {
|
2113
|
+
return !!type.shared.boundType;
|
2114
|
+
}
|
2115
|
+
TypeVarType.hasBound = hasBound;
|
2095
2116
|
})(TypeVarType || (exports.TypeVarType = TypeVarType = {}));
|
2096
2117
|
function isNever(type) {
|
2097
2118
|
return type.category === 3 /* TypeCategory.Never */;
|
2098
2119
|
}
|
2099
|
-
exports.isNever = isNever;
|
2100
2120
|
function isAny(type) {
|
2101
2121
|
return type.category === 2 /* TypeCategory.Any */;
|
2102
2122
|
}
|
2103
|
-
exports.isAny = isAny;
|
2104
2123
|
function isUnknown(type) {
|
2105
2124
|
return type.category === 1 /* TypeCategory.Unknown */;
|
2106
2125
|
}
|
2107
|
-
exports.isUnknown = isUnknown;
|
2108
2126
|
function isAnyOrUnknown(type) {
|
2109
2127
|
if (type.category === 2 /* TypeCategory.Any */ || type.category === 1 /* TypeCategory.Unknown */) {
|
2110
2128
|
return true;
|
@@ -2114,15 +2132,12 @@ function isAnyOrUnknown(type) {
|
|
2114
2132
|
}
|
2115
2133
|
return false;
|
2116
2134
|
}
|
2117
|
-
exports.isAnyOrUnknown = isAnyOrUnknown;
|
2118
2135
|
function isUnbound(type) {
|
2119
2136
|
return type.category === 0 /* TypeCategory.Unbound */;
|
2120
2137
|
}
|
2121
|
-
exports.isUnbound = isUnbound;
|
2122
2138
|
function isUnion(type) {
|
2123
2139
|
return type.category === 8 /* TypeCategory.Union */;
|
2124
2140
|
}
|
2125
|
-
exports.isUnion = isUnion;
|
2126
2141
|
function isPossiblyUnbound(type) {
|
2127
2142
|
if (isUnbound(type)) {
|
2128
2143
|
return true;
|
@@ -2132,58 +2147,45 @@ function isPossiblyUnbound(type) {
|
|
2132
2147
|
}
|
2133
2148
|
return false;
|
2134
2149
|
}
|
2135
|
-
exports.isPossiblyUnbound = isPossiblyUnbound;
|
2136
2150
|
function isClass(type) {
|
2137
2151
|
return type.category === 6 /* TypeCategory.Class */;
|
2138
2152
|
}
|
2139
|
-
exports.isClass = isClass;
|
2140
2153
|
function isInstantiableClass(type) {
|
2141
2154
|
return type.category === 6 /* TypeCategory.Class */ && TypeBase.isInstantiable(type);
|
2142
2155
|
}
|
2143
|
-
exports.isInstantiableClass = isInstantiableClass;
|
2144
2156
|
function isClassInstance(type) {
|
2145
2157
|
return type.category === 6 /* TypeCategory.Class */ && TypeBase.isInstance(type);
|
2146
2158
|
}
|
2147
|
-
exports.isClassInstance = isClassInstance;
|
2148
2159
|
function isModule(type) {
|
2149
2160
|
return type.category === 7 /* TypeCategory.Module */;
|
2150
2161
|
}
|
2151
|
-
exports.isModule = isModule;
|
2152
2162
|
function isTypeVar(type) {
|
2153
2163
|
return type.category === 9 /* TypeCategory.TypeVar */;
|
2154
2164
|
}
|
2155
|
-
exports.isTypeVar = isTypeVar;
|
2156
2165
|
function isParamSpec(type) {
|
2157
2166
|
return type.category === 9 /* TypeCategory.TypeVar */ && type.shared.kind === TypeVarKind.ParamSpec;
|
2158
2167
|
}
|
2159
|
-
exports.isParamSpec = isParamSpec;
|
2160
2168
|
function isTypeVarTuple(type) {
|
2161
2169
|
return type.category === 9 /* TypeCategory.TypeVar */ && type.shared.kind === TypeVarKind.TypeVarTuple;
|
2162
2170
|
}
|
2163
|
-
exports.isTypeVarTuple = isTypeVarTuple;
|
2164
2171
|
function isUnpackedTypeVarTuple(type) {
|
2165
|
-
return isTypeVarTuple(type) && !!type.priv.
|
2172
|
+
return isTypeVarTuple(type) && !!type.priv.isUnpacked && !type.priv.isInUnion;
|
2166
2173
|
}
|
2167
|
-
exports.isUnpackedTypeVarTuple = isUnpackedTypeVarTuple;
|
2168
2174
|
function isUnpackedClass(type) {
|
2169
2175
|
if (!isClass(type) || !type.priv.isUnpacked) {
|
2170
2176
|
return false;
|
2171
2177
|
}
|
2172
2178
|
return true;
|
2173
2179
|
}
|
2174
|
-
exports.isUnpackedClass = isUnpackedClass;
|
2175
2180
|
function isUnpacked(type) {
|
2176
2181
|
return isUnpackedTypeVarTuple(type) || isUnpackedClass(type);
|
2177
2182
|
}
|
2178
|
-
exports.isUnpacked = isUnpacked;
|
2179
2183
|
function isFunction(type) {
|
2180
2184
|
return type.category === 4 /* TypeCategory.Function */;
|
2181
2185
|
}
|
2182
|
-
|
2183
|
-
|
2184
|
-
return type.category === 5 /* TypeCategory.OverloadedFunction */;
|
2186
|
+
function isOverloaded(type) {
|
2187
|
+
return type.category === 5 /* TypeCategory.Overloaded */;
|
2185
2188
|
}
|
2186
|
-
exports.isOverloadedFunction = isOverloadedFunction;
|
2187
2189
|
function getTypeAliasInfo(type) {
|
2188
2190
|
var _a, _b;
|
2189
2191
|
if ((_a = type.props) === null || _a === void 0 ? void 0 : _a.typeAliasInfo) {
|
@@ -2197,7 +2199,6 @@ function getTypeAliasInfo(type) {
|
|
2197
2199
|
}
|
2198
2200
|
return undefined;
|
2199
2201
|
}
|
2200
|
-
exports.getTypeAliasInfo = getTypeAliasInfo;
|
2201
2202
|
// Determines whether two types are the same. If ignorePseudoGeneric is true,
|
2202
2203
|
// type arguments for "pseudo-generic" classes (non-generic classes whose init
|
2203
2204
|
// methods are not annotated and are therefore treated as generic) are ignored.
|
@@ -2315,8 +2316,8 @@ function isTypeSame(type1, type2, options = {}, recursionCount = 0) {
|
|
2315
2316
|
else if (isKeywordOnlySeparator(param1) && isKeywordOnlySeparator(param2)) {
|
2316
2317
|
continue;
|
2317
2318
|
}
|
2318
|
-
const param1Type = FunctionType.
|
2319
|
-
const param2Type = FunctionType.
|
2319
|
+
const param1Type = FunctionType.getParamType(type1, i);
|
2320
|
+
const param2Type = FunctionType.getParamType(functionType2, i);
|
2320
2321
|
if (!isTypeSame(param1Type, param2Type, { ...options, ignoreTypeFlags: false }, recursionCount)) {
|
2321
2322
|
return false;
|
2322
2323
|
}
|
@@ -2345,16 +2346,16 @@ function isTypeSame(type1, type2, options = {}, recursionCount = 0) {
|
|
2345
2346
|
}
|
2346
2347
|
return true;
|
2347
2348
|
}
|
2348
|
-
case 5 /* TypeCategory.
|
2349
|
+
case 5 /* TypeCategory.Overloaded */: {
|
2349
2350
|
// Make sure the overload counts match.
|
2350
2351
|
const functionType2 = type2;
|
2351
|
-
if (type1.priv.
|
2352
|
+
if (type1.priv._overloads.length !== functionType2.priv._overloads.length) {
|
2352
2353
|
return false;
|
2353
2354
|
}
|
2354
2355
|
// We assume here that overloaded functions always appear
|
2355
2356
|
// in the same order from one analysis pass to another.
|
2356
|
-
for (let i = 0; i < type1.priv.
|
2357
|
-
if (!isTypeSame(type1.priv.
|
2357
|
+
for (let i = 0; i < type1.priv._overloads.length; i++) {
|
2358
|
+
if (!isTypeSame(type1.priv._overloads[i], functionType2.priv._overloads[i], options, recursionCount)) {
|
2358
2359
|
return false;
|
2359
2360
|
}
|
2360
2361
|
}
|
@@ -2393,7 +2394,7 @@ function isTypeSame(type1, type2, options = {}, recursionCount = 0) {
|
|
2393
2394
|
}
|
2394
2395
|
}
|
2395
2396
|
if (isTypeVarTuple(type1) && isTypeVarTuple(type2TypeVar)) {
|
2396
|
-
if (!type1.priv.
|
2397
|
+
if (!type1.priv.isInUnion !== !type2TypeVar.priv.isInUnion) {
|
2397
2398
|
return false;
|
2398
2399
|
}
|
2399
2400
|
}
|
@@ -2458,13 +2459,11 @@ function isTypeSame(type1, type2, options = {}, recursionCount = 0) {
|
|
2458
2459
|
}
|
2459
2460
|
return true;
|
2460
2461
|
}
|
2461
|
-
exports.isTypeSame = isTypeSame;
|
2462
2462
|
// If the type is a union, remove an "unknown" type from the union,
|
2463
2463
|
// returning only the known types.
|
2464
2464
|
function removeUnknownFromUnion(type) {
|
2465
2465
|
return removeFromUnion(type, (t) => isUnknown(t));
|
2466
2466
|
}
|
2467
|
-
exports.removeUnknownFromUnion = removeUnknownFromUnion;
|
2468
2467
|
// If the type is a union, remove an "unbound" type from the union,
|
2469
2468
|
// returning only the known types.
|
2470
2469
|
function removeUnbound(type) {
|
@@ -2476,7 +2475,6 @@ function removeUnbound(type) {
|
|
2476
2475
|
}
|
2477
2476
|
return type;
|
2478
2477
|
}
|
2479
|
-
exports.removeUnbound = removeUnbound;
|
2480
2478
|
function removeFromUnion(type, removeFilter) {
|
2481
2479
|
if (isUnion(type)) {
|
2482
2480
|
const remainingTypes = type.priv.subtypes.filter((t) => !removeFilter(t));
|
@@ -2490,7 +2488,6 @@ function removeFromUnion(type, removeFilter) {
|
|
2490
2488
|
}
|
2491
2489
|
return type;
|
2492
2490
|
}
|
2493
|
-
exports.removeFromUnion = removeFromUnion;
|
2494
2491
|
function findSubtype(type, filter) {
|
2495
2492
|
if (isUnion(type)) {
|
2496
2493
|
return type.priv.subtypes.find((subtype) => {
|
@@ -2499,7 +2496,6 @@ function findSubtype(type, filter) {
|
|
2499
2496
|
}
|
2500
2497
|
return filter(type) ? type : undefined;
|
2501
2498
|
}
|
2502
|
-
exports.findSubtype = findSubtype;
|
2503
2499
|
// Combines multiple types into a single type. If the types are
|
2504
2500
|
// the same, only one is returned. If they differ, they
|
2505
2501
|
// are combined into a UnionType. NeverTypes are filtered out.
|
@@ -2604,7 +2600,6 @@ function combineTypes(subtypes, options) {
|
|
2604
2600
|
}
|
2605
2601
|
return newUnionType;
|
2606
2602
|
}
|
2607
|
-
exports.combineTypes = combineTypes;
|
2608
2603
|
// Determines whether the dest type is the same as the source type with
|
2609
2604
|
// the possible exception that the source type has a literal value when
|
2610
2605
|
// the dest does not.
|
@@ -2625,7 +2620,6 @@ function isSameWithoutLiteralValue(destType, srcType) {
|
|
2625
2620
|
}
|
2626
2621
|
return false;
|
2627
2622
|
}
|
2628
|
-
exports.isSameWithoutLiteralValue = isSameWithoutLiteralValue;
|
2629
2623
|
function _addTypeIfUnique(unionType, typeToAdd, elideRedundantLiterals) {
|
2630
2624
|
var _a, _b, _c;
|
2631
2625
|
// Handle the addition of a string literal in a special manner to
|