@zzzen/pyright-internal 1.2.0-dev.20221016 → 1.2.0-dev.20221127
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/backgroundAnalysisProgram.d.ts +7 -9
- package/dist/analyzer/backgroundAnalysisProgram.js +14 -52
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -1
- package/dist/analyzer/binder.js +43 -32
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/checker.d.ts +15 -3
- package/dist/analyzer/checker.js +260 -143
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/codeFlowEngine.d.ts +2 -2
- package/dist/analyzer/codeFlowEngine.js +85 -88
- package/dist/analyzer/codeFlowEngine.js.map +1 -1
- package/dist/analyzer/codeFlowTypes.d.ts +1 -0
- package/dist/analyzer/codeFlowTypes.js +3 -1
- package/dist/analyzer/codeFlowTypes.js.map +1 -1
- package/dist/analyzer/constraintSolver.js +1 -1
- package/dist/analyzer/constraintSolver.js.map +1 -1
- package/dist/analyzer/dataClasses.d.ts +3 -3
- package/dist/analyzer/dataClasses.js +77 -57
- package/dist/analyzer/dataClasses.js.map +1 -1
- package/dist/analyzer/declaration.js.map +1 -1
- package/dist/analyzer/declarationUtils.d.ts +1 -1
- package/dist/analyzer/declarationUtils.js +6 -4
- package/dist/analyzer/declarationUtils.js.map +1 -1
- package/dist/analyzer/docStringConversion.js +4 -3
- package/dist/analyzer/docStringConversion.js.map +1 -1
- package/dist/analyzer/importResolver.d.ts +3 -0
- package/dist/analyzer/importResolver.js +50 -8
- package/dist/analyzer/importResolver.js.map +1 -1
- package/dist/analyzer/importResult.d.ts +1 -0
- package/dist/analyzer/namedTuples.js +1 -1
- package/dist/analyzer/namedTuples.js.map +1 -1
- package/dist/analyzer/packageTypeVerifier.d.ts +2 -1
- package/dist/analyzer/packageTypeVerifier.js +16 -10
- package/dist/analyzer/packageTypeVerifier.js.map +1 -1
- package/dist/analyzer/parseTreeUtils.d.ts +2 -1
- package/dist/analyzer/parseTreeUtils.js +38 -3
- package/dist/analyzer/parseTreeUtils.js.map +1 -1
- package/dist/analyzer/parseTreeWalker.d.ts +86 -79
- package/dist/analyzer/parseTreeWalker.js +384 -201
- package/dist/analyzer/parseTreeWalker.js.map +1 -1
- package/dist/analyzer/program.d.ts +4 -7
- package/dist/analyzer/program.js +76 -77
- package/dist/analyzer/program.js.map +1 -1
- package/dist/analyzer/properties.js +10 -3
- package/dist/analyzer/properties.js.map +1 -1
- package/dist/analyzer/protocols.js +1 -1
- package/dist/analyzer/protocols.js.map +1 -1
- package/dist/analyzer/regions.d.ts +11 -0
- package/dist/analyzer/regions.js +57 -0
- package/dist/analyzer/regions.js.map +1 -0
- package/dist/analyzer/service.d.ts +9 -6
- package/dist/analyzer/service.js +58 -27
- package/dist/analyzer/service.js.map +1 -1
- package/dist/analyzer/sourceFile.d.ts +5 -2
- package/dist/analyzer/sourceFile.js +21 -8
- package/dist/analyzer/sourceFile.js.map +1 -1
- package/dist/analyzer/sourceFileInfoUtils.d.ts +1 -1
- package/dist/analyzer/sourceFileInfoUtils.js +1 -1
- package/dist/analyzer/sourceFileInfoUtils.js.map +1 -1
- package/dist/analyzer/sourceMapper.d.ts +6 -1
- package/dist/analyzer/sourceMapper.js +28 -5
- package/dist/analyzer/sourceMapper.js.map +1 -1
- package/dist/analyzer/sourceMapperUtils.d.ts +2 -1
- package/dist/analyzer/sourceMapperUtils.js +17 -5
- package/dist/analyzer/sourceMapperUtils.js.map +1 -1
- package/dist/analyzer/staticExpressions.js +19 -9
- package/dist/analyzer/staticExpressions.js.map +1 -1
- package/dist/analyzer/symbolUtils.d.ts +1 -0
- package/dist/analyzer/symbolUtils.js +5 -1
- package/dist/analyzer/symbolUtils.js.map +1 -1
- package/dist/analyzer/typeEvaluator.js +643 -254
- package/dist/analyzer/typeEvaluator.js.map +1 -1
- package/dist/analyzer/typeEvaluatorTypes.d.ts +15 -4
- package/dist/analyzer/typeGuards.js +9 -0
- package/dist/analyzer/typeGuards.js.map +1 -1
- package/dist/analyzer/typePrinter.d.ts +3 -1
- package/dist/analyzer/typePrinter.js +135 -26
- package/dist/analyzer/typePrinter.js.map +1 -1
- package/dist/analyzer/typeStubWriter.js +5 -1
- package/dist/analyzer/typeStubWriter.js.map +1 -1
- package/dist/analyzer/typeUtils.d.ts +4 -2
- package/dist/analyzer/typeUtils.js +112 -20
- package/dist/analyzer/typeUtils.js.map +1 -1
- package/dist/analyzer/typedDicts.js +8 -6
- package/dist/analyzer/typedDicts.js.map +1 -1
- package/dist/analyzer/types.d.ts +5 -4
- package/dist/analyzer/types.js +43 -20
- package/dist/analyzer/types.js.map +1 -1
- package/dist/backgroundAnalysisBase.d.ts +6 -4
- package/dist/backgroundAnalysisBase.js +30 -9
- package/dist/backgroundAnalysisBase.js.map +1 -1
- package/dist/backgroundThreadBase.d.ts +2 -1
- package/dist/backgroundThreadBase.js +4 -0
- package/dist/backgroundThreadBase.js.map +1 -1
- package/dist/commands/createTypeStub.js +3 -1
- package/dist/commands/createTypeStub.js.map +1 -1
- package/dist/common/configOptions.d.ts +1 -0
- package/dist/common/configOptions.js +4 -0
- package/dist/common/configOptions.js.map +1 -1
- package/dist/common/core.d.ts +2 -0
- package/dist/common/core.js +24 -3
- package/dist/common/core.js.map +1 -1
- package/dist/common/diagnostic.d.ts +8 -0
- package/dist/common/diagnostic.js +5 -1
- package/dist/common/diagnostic.js.map +1 -1
- package/dist/common/diagnosticRules.d.ts +2 -1
- package/dist/common/diagnosticRules.js +1 -0
- package/dist/common/diagnosticRules.js.map +1 -1
- package/dist/common/fileSystem.d.ts +1 -0
- package/dist/common/fileSystem.js.map +1 -1
- package/dist/common/pathUtils.d.ts +1 -0
- package/dist/common/pathUtils.js +13 -3
- package/dist/common/pathUtils.js.map +1 -1
- package/dist/common/pythonVersion.d.ts +1 -1
- package/dist/common/pythonVersion.js +1 -1
- package/dist/common/realFileSystem.js +12 -3
- package/dist/common/realFileSystem.js.map +1 -1
- package/dist/common/workspaceEditUtils.d.ts +6 -1
- package/dist/common/workspaceEditUtils.js +72 -1
- package/dist/common/workspaceEditUtils.js.map +1 -1
- package/dist/languageServerBase.d.ts +7 -5
- package/dist/languageServerBase.js +30 -20
- package/dist/languageServerBase.js.map +1 -1
- package/dist/languageService/analyzerServiceExecutor.d.ts +6 -2
- package/dist/languageService/analyzerServiceExecutor.js +7 -4
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -1
- package/dist/languageService/autoImporter.js +2 -1
- package/dist/languageService/autoImporter.js.map +1 -1
- package/dist/languageService/codeActionProvider.js +30 -0
- package/dist/languageService/codeActionProvider.js.map +1 -1
- package/dist/languageService/completionProvider.d.ts +1 -0
- package/dist/languageService/completionProvider.js +66 -28
- package/dist/languageService/completionProvider.js.map +1 -1
- package/dist/languageService/definitionProvider.d.ts +2 -0
- package/dist/languageService/definitionProvider.js +3 -0
- package/dist/languageService/definitionProvider.js.map +1 -1
- package/dist/languageService/documentSymbolCollector.js +7 -3
- package/dist/languageService/documentSymbolCollector.js.map +1 -1
- package/dist/languageService/documentSymbolProvider.js +1 -1
- package/dist/languageService/documentSymbolProvider.js.map +1 -1
- package/dist/languageService/hoverProvider.d.ts +1 -1
- package/dist/languageService/hoverProvider.js +73 -38
- package/dist/languageService/hoverProvider.js.map +1 -1
- package/dist/languageService/referencesProvider.js +2 -1
- package/dist/languageService/referencesProvider.js.map +1 -1
- package/dist/languageService/signatureHelpProvider.js +1 -2
- package/dist/languageService/signatureHelpProvider.js.map +1 -1
- package/dist/languageService/tooltipUtils.js +30 -19
- package/dist/languageService/tooltipUtils.js.map +1 -1
- package/dist/localization/localize.d.ts +29 -4
- package/dist/localization/localize.js +20 -5
- package/dist/localization/localize.js.map +1 -1
- package/dist/localization/package.nls.en-us.json +18 -3
- package/dist/parser/parseNodes.d.ts +2 -1
- package/dist/parser/parseNodes.js +6 -1
- package/dist/parser/parseNodes.js.map +1 -1
- package/dist/parser/parser.js +19 -13
- package/dist/parser/parser.js.map +1 -1
- package/dist/parser/tokenizer.js +2 -1
- package/dist/parser/tokenizer.js.map +1 -1
- package/dist/pyright.js +4 -4
- package/dist/pyright.js.map +1 -1
- package/dist/pyrightFileSystem.d.ts +1 -0
- package/dist/pyrightFileSystem.js +3 -0
- package/dist/pyrightFileSystem.js.map +1 -1
- package/dist/readonlyAugmentedFileSystem.d.ts +1 -0
- package/dist/readonlyAugmentedFileSystem.js +3 -0
- package/dist/readonlyAugmentedFileSystem.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/tests/checker.test.js +25 -2
- package/dist/tests/checker.test.js.map +1 -1
- package/dist/tests/config.test.js +11 -0
- package/dist/tests/config.test.js.map +1 -1
- package/dist/tests/diagnostics.test.d.ts +1 -0
- package/dist/tests/diagnostics.test.js +37 -0
- package/dist/tests/diagnostics.test.js.map +1 -0
- package/dist/tests/docStringConversion.test.js +25 -0
- package/dist/tests/docStringConversion.test.js.map +1 -1
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +1 -1
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +5 -5
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.classVariable.fourslash.js +28 -6
- package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -1
- package/dist/tests/fourslash/{signature.paramspec.fourslash.d.ts → completions.dunderNew.Inheritance.fourslash.d.ts} +0 -0
- package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.dunderNew.Inheritance.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dunderNew.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dunderNew.fourslash.js +20 -0
- package/dist/tests/fourslash/completions.dunderNew.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fourslash.js +2 -2
- package/dist/tests/fourslash/completions.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +1 -1
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +1 -1
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.libStub.fourslash.js +1 -1
- package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.localCode.fourslash.js +2 -2
- package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.plainText.fourslash.js +2 -2
- package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.self.fourslash.js +2 -2
- package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -1
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +1 -1
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +2 -2
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -1
- package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.js +32 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImportWithInit.fourslash.js.map +1 -0
- package/dist/tests/fourslash/fourslash.d.ts +2 -1
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +2 -2
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +4 -4
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +2 -2
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docstring.alias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.alias.fourslash.js +24 -0
- package/dist/tests/fourslash/hover.docstring.alias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js +3 -3
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.js +13 -0
- package/dist/tests/fourslash/hover.dunderNew.basic.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.js +15 -0
- package/dist/tests/fourslash/hover.dunderNew.inheritance.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.js +21 -0
- package/dist/tests/fourslash/hover.dunderNew.inheritance2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.js +17 -0
- package/dist/tests/fourslash/hover.dunderNew.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.js +15 -0
- package/dist/tests/fourslash/hover.dunderNew.withInit.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +3 -3
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +2 -2
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +2 -2
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.init.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.libStub.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.plainText.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -1
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +1 -1
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -1
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +1 -1
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -1
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +1 -1
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -1
- package/dist/tests/fourslash/shadowedImports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/shadowedImports.fourslash.js +75 -0
- package/dist/tests/fourslash/shadowedImports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.dunderNew.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.dunderNew.fourslash.js +24 -0
- package/dist/tests/fourslash/signature.dunderNew.fourslash.js.map +1 -0
- package/dist/tests/harness/fourslash/runner.js +1 -1
- package/dist/tests/harness/fourslash/runner.js.map +1 -1
- package/dist/tests/harness/fourslash/testLanguageService.d.ts +3 -1
- package/dist/tests/harness/fourslash/testLanguageService.js +4 -2
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -1
- package/dist/tests/harness/fourslash/testState.d.ts +7 -7
- package/dist/tests/harness/fourslash/testState.js +77 -161
- package/dist/tests/harness/fourslash/testState.js.map +1 -1
- package/dist/tests/harness/fourslash/workspaceEditTestUtils.d.ts +16 -0
- package/dist/tests/harness/fourslash/workspaceEditTestUtils.js +159 -0
- package/dist/tests/harness/fourslash/workspaceEditTestUtils.js.map +1 -0
- package/dist/tests/harness/vfs/filesystem.d.ts +1 -0
- package/dist/tests/harness/vfs/filesystem.js +3 -0
- package/dist/tests/harness/vfs/filesystem.js.map +1 -1
- package/dist/tests/ipythonMode.test.js +39 -0
- package/dist/tests/ipythonMode.test.js.map +1 -1
- package/dist/tests/logger.test.js +3 -1
- package/dist/tests/logger.test.js.map +1 -1
- package/dist/tests/pathUtils.test.js +7 -0
- package/dist/tests/pathUtils.test.js.map +1 -1
- package/dist/tests/sourceFile.test.js +34 -1
- package/dist/tests/sourceFile.test.js.map +1 -1
- package/dist/tests/sourceMapperUtils.test.js +39 -4
- package/dist/tests/sourceMapperUtils.test.js.map +1 -1
- package/dist/tests/tokenizer.test.js +6 -2
- package/dist/tests/tokenizer.test.js.map +1 -1
- package/dist/tests/typeEvaluator1.test.js +16 -6
- package/dist/tests/typeEvaluator1.test.js.map +1 -1
- package/dist/tests/typeEvaluator2.test.js +15 -3
- package/dist/tests/typeEvaluator2.test.js.map +1 -1
- package/dist/tests/typeEvaluator3.test.js +40 -10
- package/dist/tests/typeEvaluator3.test.js.map +1 -1
- package/dist/tests/typeEvaluator4.test.js +11 -7
- package/dist/tests/typeEvaluator4.test.js.map +1 -1
- package/dist/tests/typeEvaluator5.test.js +48 -0
- package/dist/tests/typeEvaluator5.test.js.map +1 -1
- package/dist/tests/typePrinter.test.d.ts +1 -0
- package/dist/tests/typePrinter.test.js +148 -0
- package/dist/tests/typePrinter.test.js.map +1 -0
- package/dist/tests/workspaceEditUtils.test.d.ts +1 -0
- package/dist/tests/workspaceEditUtils.test.js +167 -0
- package/dist/tests/workspaceEditUtils.test.js.map +1 -0
- package/dist/workspaceMap.d.ts +2 -0
- package/dist/workspaceMap.js +45 -12
- package/dist/workspaceMap.js.map +1 -1
- package/package.json +3 -3
- package/dist/tests/fourslash/signature.paramspec.fourslash.js +0 -30
- package/dist/tests/fourslash/signature.paramspec.fourslash.js.map +0 -1
@@ -1,12 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
/*
|
3
|
-
* testState.ts
|
4
|
-
* Copyright (c) Microsoft Corporation.
|
5
|
-
* Licensed under the MIT license.
|
6
|
-
*
|
7
|
-
* TestState wraps currently test states and provides a way to query and manipulate
|
8
|
-
* the test states.
|
9
|
-
*/
|
10
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
11
3
|
if (k2 === undefined) k2 = k;
|
12
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
@@ -30,9 +22,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
31
23
|
};
|
32
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
33
|
-
exports.createVfsInfoFromFourSlashData = exports.getNodeAtMarker = exports.getNodeForRange = exports.parseAndGetTestState = exports.TestState = void 0;
|
25
|
+
exports.getMarkerNames = exports.getMarkerByName = exports.getMarkerName = exports.createVfsInfoFromFourSlashData = exports.getNodeAtMarker = exports.getNodeForRange = exports.parseAndGetTestState = exports.TestState = void 0;
|
26
|
+
/*
|
27
|
+
* testState.ts
|
28
|
+
* Copyright (c) Microsoft Corporation.
|
29
|
+
* Licensed under the MIT license.
|
30
|
+
*
|
31
|
+
* TestState wraps currently test states and provides a way to query and manipulate
|
32
|
+
* the test states.
|
33
|
+
*/
|
34
34
|
const assert_1 = __importDefault(require("assert"));
|
35
35
|
const JSONC = __importStar(require("jsonc-parser"));
|
36
|
+
const path = __importStar(require("path"));
|
36
37
|
const vscode_languageserver_1 = require("vscode-languageserver");
|
37
38
|
const parseTreeUtils_1 = require("../../../analyzer/parseTreeUtils");
|
38
39
|
const service_1 = require("../../../analyzer/service");
|
@@ -60,6 +61,7 @@ const vfs = __importStar(require("../vfs/filesystem"));
|
|
60
61
|
const fourSlashParser_1 = require("./fourSlashParser");
|
61
62
|
const fourSlashTypes_1 = require("./fourSlashTypes");
|
62
63
|
const testLanguageService_1 = require("./testLanguageService");
|
64
|
+
const workspaceEditTestUtils_1 = require("./workspaceEditTestUtils");
|
63
65
|
const testAccessHost = new testAccessHost_1.TestAccessHost(vfs.MODULE_PATH, [factory_1.libFolder, factory_1.distlibFolder]);
|
64
66
|
class TestState {
|
65
67
|
constructor(projectRoot, testData, mountPaths, hostSpecificFeatures) {
|
@@ -84,7 +86,7 @@ class TestState {
|
|
84
86
|
configOptions.initializeFromJson(this.rawConfigJson, 'basic', this.console, this.fs, testAccessHost);
|
85
87
|
this._applyTestConfigOptions(configOptions);
|
86
88
|
}
|
87
|
-
const service = this._createAnalysisService(this.console, this._hostSpecificFeatures.importResolverFactory, configOptions);
|
89
|
+
const service = this._createAnalysisService(this.console, this._hostSpecificFeatures.importResolverFactory, this._hostSpecificFeatures.backgroundAnalysisProgramFactory, configOptions);
|
88
90
|
this.workspace = {
|
89
91
|
workspaceName: 'test workspace',
|
90
92
|
rootPath: vfsInfo.projectRoot,
|
@@ -97,7 +99,6 @@ class TestState {
|
|
97
99
|
disableWorkspaceSymbol: false,
|
98
100
|
isInitialized: (0, deferred_1.createDeferred)(),
|
99
101
|
searchPathsToWatch: [],
|
100
|
-
owns: (f) => true,
|
101
102
|
};
|
102
103
|
const indexer = (0, core_1.toBoolean)(testData.globalOptions["indexer" /* indexer */]);
|
103
104
|
const indexerWithoutStdLib = (0, core_1.toBoolean)(testData.globalOptions["indexerwithoutstdlib" /* indexerWithoutStdLib */]);
|
@@ -158,32 +159,17 @@ class TestState {
|
|
158
159
|
return this.fs.getMappedFilePath(path);
|
159
160
|
}
|
160
161
|
getMarkerName(m) {
|
161
|
-
|
162
|
-
this.testData.markerPositions.forEach((marker, name) => {
|
163
|
-
if (marker === m) {
|
164
|
-
found = name;
|
165
|
-
}
|
166
|
-
});
|
167
|
-
assert_1.default.ok(found);
|
168
|
-
return found;
|
162
|
+
return getMarkerName(this.testData, m);
|
169
163
|
}
|
170
164
|
getMarkerByName(markerName) {
|
171
|
-
|
172
|
-
if (markerPos === undefined) {
|
173
|
-
throw new Error(`Unknown marker "${markerName}" Available markers: ${this.getMarkerNames()
|
174
|
-
.map((m) => '"' + m + '"')
|
175
|
-
.join(', ')}`);
|
176
|
-
}
|
177
|
-
else {
|
178
|
-
return markerPos;
|
179
|
-
}
|
165
|
+
return getMarkerByName(this.testData, markerName);
|
180
166
|
}
|
181
167
|
getMarkers() {
|
182
168
|
// Return a copy of the list
|
183
169
|
return this.testData.markers.slice(0);
|
184
170
|
}
|
185
171
|
getMarkerNames() {
|
186
|
-
return
|
172
|
+
return getMarkerNames(this.testData);
|
187
173
|
}
|
188
174
|
getPositionRange(markerString) {
|
189
175
|
const marker = this.getMarkerByName(markerString);
|
@@ -217,6 +203,9 @@ class TestState {
|
|
217
203
|
getDirectoryPath(path) {
|
218
204
|
return (0, pathUtils_1.getDirectoryPath)(path);
|
219
205
|
}
|
206
|
+
getPathSep() {
|
207
|
+
return path.sep;
|
208
|
+
}
|
220
209
|
goToPosition(positionOrLineAndColumn) {
|
221
210
|
const pos = (0, core_1.isNumber)(positionOrLineAndColumn)
|
222
211
|
? positionOrLineAndColumn
|
@@ -380,7 +369,7 @@ class TestState {
|
|
380
369
|
this._checkPostEditInvariants();
|
381
370
|
}
|
382
371
|
verifyDiagnostics(map) {
|
383
|
-
this.
|
372
|
+
this.analyze();
|
384
373
|
// organize things per file
|
385
374
|
const resultPerFile = this._getDiagnosticsPerFile();
|
386
375
|
const rangePerFile = this.createMultiMap(this.getRanges(), (r) => r.fileName);
|
@@ -415,8 +404,12 @@ class TestState {
|
|
415
404
|
? result.warnings
|
416
405
|
: category === 'information'
|
417
406
|
? result.information
|
418
|
-
:
|
419
|
-
|
407
|
+
: category === 'unused'
|
408
|
+
? result.unused
|
409
|
+
: category === 'none'
|
410
|
+
? []
|
411
|
+
: this.raiseError(`unexpected category ${category}`);
|
412
|
+
if (expected.length !== actual.length && category !== 'none') {
|
420
413
|
this.raiseError(`contains unexpected result - expected: ${(0, utils_1.stringify)(expected)}, actual: ${(0, utils_1.stringify)(actual)}`);
|
421
414
|
}
|
422
415
|
for (const range of expected) {
|
@@ -425,13 +418,19 @@ class TestState {
|
|
425
418
|
const diagnosticSpan = textRange_1.TextRange.fromBounds((0, positionUtils_1.convertPositionToOffset)(d.range.start, lines), (0, positionUtils_1.convertPositionToOffset)(d.range.end, lines));
|
426
419
|
return this._deepEqual(diagnosticSpan, rangeSpan);
|
427
420
|
});
|
428
|
-
|
421
|
+
// If the map is provided, it might say
|
422
|
+
// a marker should have none.
|
423
|
+
const name = map ? this.getMarkerName(range.marker) : '';
|
424
|
+
const message = map ? map[name].message : undefined;
|
425
|
+
const expectMatches = !!message;
|
426
|
+
if (expectMatches && matches.length === 0) {
|
429
427
|
this.raiseError(`doesn't contain expected range: ${(0, utils_1.stringify)(range)}`);
|
430
428
|
}
|
429
|
+
else if (!expectMatches && matches.length !== 0) {
|
430
|
+
this.raiseError(`${name} should not contain any matches`);
|
431
|
+
}
|
431
432
|
// if map is provided, check message as well
|
432
|
-
if (
|
433
|
-
const name = this.getMarkerName(range.marker);
|
434
|
-
const message = map[name].message;
|
433
|
+
if (message) {
|
435
434
|
if (matches.filter((d) => message === d.message).length !== 1) {
|
436
435
|
this.raiseError(`message doesn't match: ${message} of ${name} - ${(0, utils_1.stringify)(range)}, actual: ${(0, utils_1.stringify)(matches)}`);
|
437
436
|
}
|
@@ -454,7 +453,7 @@ class TestState {
|
|
454
453
|
async verifyCodeActions(map, verifyCodeActionCount) {
|
455
454
|
// make sure we don't use cache built from other tests
|
456
455
|
this.workspace.serviceInstance.invalidateAndForceReanalysis();
|
457
|
-
this.
|
456
|
+
this.analyze();
|
458
457
|
for (const range of this.getRanges()) {
|
459
458
|
const name = this.getMarkerName(range.marker);
|
460
459
|
if (!map[name]) {
|
@@ -504,7 +503,7 @@ class TestState {
|
|
504
503
|
}
|
505
504
|
}
|
506
505
|
async verifyCommand(command, files) {
|
507
|
-
this.
|
506
|
+
this.analyze();
|
508
507
|
const commandResult = await this._hostSpecificFeatures.execute(new testLanguageService_1.TestLanguageService(this.workspace, this.console, this.fs), { command: command.command, arguments: command.arguments || [] }, vscode_languageserver_1.CancellationToken.None);
|
509
508
|
if (command.command === 'pyright.createtypestub') {
|
510
509
|
await this._verifyFiles(files);
|
@@ -524,123 +523,11 @@ class TestState {
|
|
524
523
|
return commandResult;
|
525
524
|
}
|
526
525
|
verifyWorkspaceEdit(expected, actual) {
|
527
|
-
|
528
|
-
this._verifyTextEditMap(expected.changes, actual.changes);
|
529
|
-
}
|
530
|
-
else {
|
531
|
-
(0, assert_1.default)(!expected.changes);
|
532
|
-
}
|
533
|
-
if (actual.documentChanges) {
|
534
|
-
this._verifyDocumentEdits(expected.documentChanges, actual.documentChanges);
|
535
|
-
}
|
536
|
-
else {
|
537
|
-
(0, assert_1.default)(!expected.documentChanges);
|
538
|
-
}
|
539
|
-
if (actual.changeAnnotations) {
|
540
|
-
this._verifyChangeAnnotations(expected.changeAnnotations, actual.changeAnnotations);
|
541
|
-
}
|
542
|
-
else {
|
543
|
-
(0, assert_1.default)(!expected.changeAnnotations);
|
544
|
-
}
|
545
|
-
}
|
546
|
-
_verifyChangeAnnotations(expected, actual) {
|
547
|
-
assert_1.default.strictEqual(Object.entries(expected).length, Object.entries(actual).length);
|
548
|
-
for (const key of Object.keys(expected)) {
|
549
|
-
const expectedAnnotation = expected[key];
|
550
|
-
const actualAnnotation = actual[key];
|
551
|
-
// We need to improve it to test localized strings.
|
552
|
-
assert_1.default.strictEqual(expectedAnnotation.label, actualAnnotation.label);
|
553
|
-
assert_1.default.strictEqual(expectedAnnotation.description, actualAnnotation.description);
|
554
|
-
assert_1.default.strictEqual(expectedAnnotation.needsConfirmation, actualAnnotation.needsConfirmation);
|
555
|
-
}
|
556
|
-
}
|
557
|
-
_textDocumentAreSame(expected, actual) {
|
558
|
-
return expected.version === actual.version && expected.uri === actual.uri;
|
559
|
-
}
|
560
|
-
_verifyDocumentEdits(expected, actual) {
|
561
|
-
assert_1.default.strictEqual(expected.length, actual.length);
|
562
|
-
for (const op of expected) {
|
563
|
-
(0, assert_1.default)(actual.some((a) => {
|
564
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
565
|
-
const expectedKind = vscode_languageserver_1.TextDocumentEdit.is(op) ? 'edit' : op.kind;
|
566
|
-
const actualKind = vscode_languageserver_1.TextDocumentEdit.is(a) ? 'edit' : a.kind;
|
567
|
-
if (expectedKind !== actualKind) {
|
568
|
-
return false;
|
569
|
-
}
|
570
|
-
switch (expectedKind) {
|
571
|
-
case 'edit': {
|
572
|
-
const expectedEdit = op;
|
573
|
-
const actualEdit = a;
|
574
|
-
if (!this._textDocumentAreSame(expectedEdit.textDocument, actualEdit.textDocument)) {
|
575
|
-
return false;
|
576
|
-
}
|
577
|
-
return this._textEditsAreSame(expectedEdit.edits, actualEdit.edits);
|
578
|
-
}
|
579
|
-
case 'create': {
|
580
|
-
const expectedOp = op;
|
581
|
-
const actualOp = a;
|
582
|
-
return (expectedOp.kind === actualOp.kind &&
|
583
|
-
expectedOp.annotationId === actualOp.annotationId &&
|
584
|
-
expectedOp.uri === actualOp.uri &&
|
585
|
-
((_a = expectedOp.options) === null || _a === void 0 ? void 0 : _a.ignoreIfExists) === ((_b = actualOp.options) === null || _b === void 0 ? void 0 : _b.ignoreIfExists) &&
|
586
|
-
((_c = expectedOp.options) === null || _c === void 0 ? void 0 : _c.overwrite) === ((_d = actualOp.options) === null || _d === void 0 ? void 0 : _d.overwrite));
|
587
|
-
}
|
588
|
-
case 'rename': {
|
589
|
-
const expectedOp = op;
|
590
|
-
const actualOp = a;
|
591
|
-
return (expectedOp.kind === actualOp.kind &&
|
592
|
-
expectedOp.annotationId === actualOp.annotationId &&
|
593
|
-
expectedOp.oldUri === actualOp.oldUri &&
|
594
|
-
expectedOp.newUri === actualOp.newUri &&
|
595
|
-
((_e = expectedOp.options) === null || _e === void 0 ? void 0 : _e.ignoreIfExists) === ((_f = actualOp.options) === null || _f === void 0 ? void 0 : _f.ignoreIfExists) &&
|
596
|
-
((_g = expectedOp.options) === null || _g === void 0 ? void 0 : _g.overwrite) === ((_h = actualOp.options) === null || _h === void 0 ? void 0 : _h.overwrite));
|
597
|
-
}
|
598
|
-
case 'delete': {
|
599
|
-
const expectedOp = op;
|
600
|
-
const actualOp = a;
|
601
|
-
return (expectedOp.annotationId === actualOp.annotationId &&
|
602
|
-
expectedOp.kind === actualOp.kind &&
|
603
|
-
expectedOp.uri === actualOp.uri &&
|
604
|
-
((_j = expectedOp.options) === null || _j === void 0 ? void 0 : _j.ignoreIfNotExists) === ((_k = actualOp.options) === null || _k === void 0 ? void 0 : _k.ignoreIfNotExists) &&
|
605
|
-
((_l = expectedOp.options) === null || _l === void 0 ? void 0 : _l.recursive) === ((_m = actualOp.options) === null || _m === void 0 ? void 0 : _m.recursive));
|
606
|
-
}
|
607
|
-
default:
|
608
|
-
debug.assertNever(expectedKind);
|
609
|
-
}
|
610
|
-
}));
|
611
|
-
}
|
612
|
-
}
|
613
|
-
_verifyTextEditMap(expected, actual) {
|
614
|
-
assert_1.default.strictEqual(Object.entries(expected).length, Object.entries(actual).length);
|
615
|
-
for (const key of Object.keys(expected)) {
|
616
|
-
(0, assert_1.default)(this._textEditsAreSame(expected[key], actual[key]));
|
617
|
-
}
|
618
|
-
}
|
619
|
-
_textEditsAreSame(expectedEdits, actualEdits) {
|
620
|
-
if (expectedEdits.length !== actualEdits.length) {
|
621
|
-
return false;
|
622
|
-
}
|
623
|
-
for (const edit of expectedEdits) {
|
624
|
-
if (!actualEdits.some((a) => this._textEditAreSame(edit, a))) {
|
625
|
-
return false;
|
626
|
-
}
|
627
|
-
}
|
628
|
-
return true;
|
629
|
-
}
|
630
|
-
_textEditAreSame(expected, actual) {
|
631
|
-
if (!(0, textRange_1.rangesAreEqual)(expected.range, actual.range)) {
|
632
|
-
return false;
|
633
|
-
}
|
634
|
-
if (expected.newText !== actual.newText) {
|
635
|
-
return false;
|
636
|
-
}
|
637
|
-
const expectedAnnotation = vscode_languageserver_1.AnnotatedTextEdit.is(expected) ? expected.annotationId : '';
|
638
|
-
const actualAnnotation = vscode_languageserver_1.AnnotatedTextEdit.is(actual) ? actual.annotationId : '';
|
639
|
-
return expectedAnnotation === actualAnnotation;
|
526
|
+
return (0, workspaceEditTestUtils_1.verifyWorkspaceEdit)(expected, actual);
|
640
527
|
}
|
641
528
|
async verifyInvokeCodeAction(map, verifyCodeActionCount) {
|
642
529
|
var _a;
|
643
|
-
this.
|
530
|
+
this.analyze();
|
644
531
|
for (const range of this.getRanges()) {
|
645
532
|
const name = this.getMarkerName(range.marker);
|
646
533
|
if (!map[name]) {
|
@@ -733,7 +620,7 @@ class TestState {
|
|
733
620
|
}
|
734
621
|
async verifyCompletion(verifyMode, docFormat, map, abbrMap) {
|
735
622
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
736
|
-
this.
|
623
|
+
this.analyze();
|
737
624
|
for (const marker of this.getMarkers()) {
|
738
625
|
const markerName = this.getMarkerName(marker);
|
739
626
|
if (!map[markerName]) {
|
@@ -825,7 +712,7 @@ class TestState {
|
|
825
712
|
}
|
826
713
|
}
|
827
714
|
verifySignature(docFormat, map) {
|
828
|
-
this.
|
715
|
+
this.analyze();
|
829
716
|
for (const marker of this.getMarkers()) {
|
830
717
|
const fileName = marker.fileName;
|
831
718
|
const name = this.getMarkerName(marker);
|
@@ -870,7 +757,7 @@ class TestState {
|
|
870
757
|
}
|
871
758
|
verifyFindAllReferences(map) {
|
872
759
|
var _a;
|
873
|
-
this.
|
760
|
+
this.analyze();
|
874
761
|
for (const marker of this.getMarkers()) {
|
875
762
|
const fileName = marker.fileName;
|
876
763
|
const name = this.getMarkerName(marker);
|
@@ -902,7 +789,7 @@ class TestState {
|
|
902
789
|
}
|
903
790
|
verifyHighlightReferences(map) {
|
904
791
|
var _a;
|
905
|
-
this.
|
792
|
+
this.analyze();
|
906
793
|
for (const name of Object.keys(map)) {
|
907
794
|
const marker = this.getMarkerByName(name);
|
908
795
|
const fileName = marker.fileName;
|
@@ -921,7 +808,7 @@ class TestState {
|
|
921
808
|
}
|
922
809
|
verifyFindDefinitions(map, filter = definitionProvider_1.DefinitionFilter.All) {
|
923
810
|
var _a;
|
924
|
-
this.
|
811
|
+
this.analyze();
|
925
812
|
for (const marker of this.getMarkers()) {
|
926
813
|
const fileName = marker.fileName;
|
927
814
|
const name = this.getMarkerName(marker);
|
@@ -939,7 +826,7 @@ class TestState {
|
|
939
826
|
}
|
940
827
|
verifyFindTypeDefinitions(map) {
|
941
828
|
var _a;
|
942
|
-
this.
|
829
|
+
this.analyze();
|
943
830
|
for (const marker of this.getMarkers()) {
|
944
831
|
const fileName = marker.fileName;
|
945
832
|
const name = this.getMarkerName(marker);
|
@@ -957,7 +844,7 @@ class TestState {
|
|
957
844
|
}
|
958
845
|
verifyRename(map) {
|
959
846
|
var _a;
|
960
|
-
this.
|
847
|
+
this.analyze();
|
961
848
|
for (const marker of this.getMarkers()) {
|
962
849
|
const fileName = marker.fileName;
|
963
850
|
const name = this.getMarkerName(marker);
|
@@ -1222,7 +1109,7 @@ class TestState {
|
|
1222
1109
|
// If inside the edit, return -1 to mark as invalid
|
1223
1110
|
return position <= editStart ? position : position < editEnd ? -1 : position + length - +(editEnd - editStart);
|
1224
1111
|
}
|
1225
|
-
|
1112
|
+
analyze() {
|
1226
1113
|
while (this.program.analyze()) {
|
1227
1114
|
// Continue to call analyze until it completes. Since we're not
|
1228
1115
|
// specifying a timeout, it should complete the first time.
|
@@ -1240,6 +1127,7 @@ class TestState {
|
|
1240
1127
|
errors: diagnostics.filter((diag) => diag.category === 0 /* Error */),
|
1241
1128
|
warnings: diagnostics.filter((diag) => diag.category === 1 /* Warning */),
|
1242
1129
|
information: diagnostics.filter((diag) => diag.category === 2 /* Information */),
|
1130
|
+
unused: diagnostics.filter((diag) => diag.category === 3 /* UnusedCode */),
|
1243
1131
|
};
|
1244
1132
|
return [filePath, value];
|
1245
1133
|
}
|
@@ -1249,12 +1137,13 @@ class TestState {
|
|
1249
1137
|
});
|
1250
1138
|
return new Map(results);
|
1251
1139
|
}
|
1252
|
-
_createAnalysisService(nullConsole, importResolverFactory, configOptions) {
|
1140
|
+
_createAnalysisService(nullConsole, importResolverFactory, backgroundAnalysisProgramFactory, configOptions) {
|
1253
1141
|
// we do not initiate automatic analysis or file watcher in test.
|
1254
1142
|
const service = new service_1.AnalyzerService('test service', this.fs, {
|
1255
1143
|
console: nullConsole,
|
1256
1144
|
hostFactory: () => testAccessHost,
|
1257
1145
|
importResolverFactory,
|
1146
|
+
backgroundAnalysisProgramFactory,
|
1258
1147
|
configOptions,
|
1259
1148
|
});
|
1260
1149
|
// directly set files to track rather than using fileSpec from config
|
@@ -1411,6 +1300,33 @@ function createVfsInfoFromFourSlashData(projectRoot, testData) {
|
|
1411
1300
|
return { files, sourceFileNames, projectRoot, ignoreCase, rawConfigJson };
|
1412
1301
|
}
|
1413
1302
|
exports.createVfsInfoFromFourSlashData = createVfsInfoFromFourSlashData;
|
1303
|
+
function getMarkerName(testData, markerToFind) {
|
1304
|
+
let found;
|
1305
|
+
testData.markerPositions.forEach((marker, name) => {
|
1306
|
+
if (marker === markerToFind) {
|
1307
|
+
found = name;
|
1308
|
+
}
|
1309
|
+
});
|
1310
|
+
assert_1.default.ok(found);
|
1311
|
+
return found;
|
1312
|
+
}
|
1313
|
+
exports.getMarkerName = getMarkerName;
|
1314
|
+
function getMarkerByName(testData, markerName) {
|
1315
|
+
const markerPos = testData.markerPositions.get(markerName);
|
1316
|
+
if (markerPos === undefined) {
|
1317
|
+
throw new Error(`Unknown marker "${markerName}" Available markers: ${getMarkerNames(testData)
|
1318
|
+
.map((m) => '"' + m + '"')
|
1319
|
+
.join(', ')}`);
|
1320
|
+
}
|
1321
|
+
else {
|
1322
|
+
return markerPos;
|
1323
|
+
}
|
1324
|
+
}
|
1325
|
+
exports.getMarkerByName = getMarkerByName;
|
1326
|
+
function getMarkerNames(testData) {
|
1327
|
+
return [...testData.markerPositions.keys()];
|
1328
|
+
}
|
1329
|
+
exports.getMarkerNames = getMarkerNames;
|
1414
1330
|
function isConfig(file, ignoreCase) {
|
1415
1331
|
const comparer = (0, stringUtils_1.getStringComparer)(ignoreCase);
|
1416
1332
|
return service_1.configFileNames.some((f) => comparer((0, pathUtils_1.getBaseFileName)(file.fileName), f) === 0 /* EqualTo */);
|