@zzzen/pyright-internal 1.2.0-dev.20260705 → 1.2.0-dev.20260712
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/tests/typeServer/inProcTypeServerTestUtils.d.ts +39 -0
- package/dist/tests/typeServer/inProcTypeServerTestUtils.js +366 -0
- package/dist/tests/typeServer/inProcTypeServerTestUtils.js.map +1 -0
- package/dist/tests/typeServer/notebook.typeServer.test.d.ts +1 -0
- package/dist/tests/typeServer/notebook.typeServer.test.js +315 -0
- package/dist/tests/typeServer/notebook.typeServer.test.js.map +1 -0
- package/dist/tests/typeServer/typeServer.inProc.test.d.ts +1 -0
- package/dist/tests/typeServer/typeServer.inProc.test.js +234 -0
- package/dist/tests/typeServer/typeServer.inProc.test.js.map +1 -0
- package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.d.ts +1 -0
- package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.js +298 -0
- package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.js.map +1 -0
- package/dist/typeServer/cancellation.d.ts +5 -0
- package/dist/typeServer/cancellation.js +14 -0
- package/dist/typeServer/cancellation.js.map +1 -0
- package/dist/typeServer/diagnosticUtils.d.ts +4 -0
- package/dist/typeServer/diagnosticUtils.js +71 -0
- package/dist/typeServer/diagnosticUtils.js.map +1 -0
- package/dist/typeServer/enums.d.ts +14 -0
- package/dist/typeServer/enums.js +524 -0
- package/dist/typeServer/enums.js.map +1 -0
- package/dist/typeServer/eventEmitter.d.ts +12 -0
- package/dist/typeServer/eventEmitter.js +32 -0
- package/dist/typeServer/eventEmitter.js.map +1 -0
- package/dist/typeServer/nodeMain.d.ts +1 -0
- package/dist/typeServer/nodeMain.js +65 -0
- package/dist/typeServer/nodeMain.js.map +1 -0
- package/dist/typeServer/notebookCellChain.d.ts +34 -0
- package/dist/typeServer/notebookCellChain.js +182 -0
- package/dist/typeServer/notebookCellChain.js.map +1 -0
- package/dist/typeServer/notebookDocumentHandler.d.ts +23 -0
- package/dist/typeServer/notebookDocumentHandler.js +158 -0
- package/dist/typeServer/notebookDocumentHandler.js.map +1 -0
- package/dist/typeServer/notebookUriMapper.d.ts +39 -0
- package/dist/typeServer/notebookUriMapper.js +164 -0
- package/dist/typeServer/notebookUriMapper.js.map +1 -0
- package/dist/typeServer/profilingStub.d.ts +10 -0
- package/dist/typeServer/profilingStub.js +12 -0
- package/dist/typeServer/profilingStub.js.map +1 -0
- package/dist/typeServer/programTypes.d.ts +136 -0
- package/dist/typeServer/programTypes.js +3 -0
- package/dist/typeServer/programTypes.js.map +1 -0
- package/dist/typeServer/programWrapper.d.ts +134 -0
- package/dist/typeServer/programWrapper.js +731 -0
- package/dist/typeServer/programWrapper.js.map +1 -0
- package/dist/typeServer/protocol/tspSupplemental.d.ts +43 -0
- package/dist/typeServer/protocol/tspSupplemental.js +48 -0
- package/dist/typeServer/protocol/tspSupplemental.js.map +1 -0
- package/dist/typeServer/protocol/typeServerProtocol.d.ts +1102 -0
- package/dist/typeServer/protocol/typeServerProtocol.js +290 -0
- package/dist/typeServer/protocol/typeServerProtocol.js.map +1 -0
- package/dist/typeServer/server.d.ts +54 -0
- package/dist/typeServer/server.js +620 -0
- package/dist/typeServer/server.js.map +1 -0
- package/dist/typeServer/serverUtils.d.ts +4 -0
- package/dist/typeServer/serverUtils.js +21 -0
- package/dist/typeServer/serverUtils.js.map +1 -0
- package/dist/typeServer/stubGenerator.d.ts +42 -0
- package/dist/typeServer/stubGenerator.js +895 -0
- package/dist/typeServer/stubGenerator.js.map +1 -0
- package/dist/typeServer/typeCache.d.ts +31 -0
- package/dist/typeServer/typeCache.js +54 -0
- package/dist/typeServer/typeCache.js.map +1 -0
- package/dist/typeServer/typeEvalUtils.d.ts +13 -0
- package/dist/typeServer/typeEvalUtils.js +83 -0
- package/dist/typeServer/typeEvalUtils.js.map +1 -0
- package/dist/typeServer/typeGuards.d.ts +3 -0
- package/dist/typeServer/typeGuards.js +55 -0
- package/dist/typeServer/typeGuards.js.map +1 -0
- package/dist/typeServer/typeServerConversionTypes.d.ts +39 -0
- package/dist/typeServer/typeServerConversionTypes.js +448 -0
- package/dist/typeServer/typeServerConversionTypes.js.map +1 -0
- package/dist/typeServer/typeServerConversionUtils.d.ts +35 -0
- package/dist/typeServer/typeServerConversionUtils.js +524 -0
- package/dist/typeServer/typeServerConversionUtils.js.map +1 -0
- package/dist/typeServer/typeServerEvaluator.d.ts +16 -0
- package/dist/typeServer/typeServerEvaluator.js +36 -0
- package/dist/typeServer/typeServerEvaluator.js.map +1 -0
- package/dist/typeServer/typeServerFileSystem.d.ts +47 -0
- package/dist/typeServer/typeServerFileSystem.js +129 -0
- package/dist/typeServer/typeServerFileSystem.js.map +1 -0
- package/dist/typeServer/typeServerProtocolUtils.d.ts +2 -0
- package/dist/typeServer/typeServerProtocolUtils.js +7 -0
- package/dist/typeServer/typeServerProtocolUtils.js.map +1 -0
- package/dist/typeServer/typeServerServiceKeys.d.ts +7 -0
- package/dist/typeServer/typeServerServiceKeys.js +20 -0
- package/dist/typeServer/typeServerServiceKeys.js.map +1 -0
- package/dist/typeServer/typeUtils.d.ts +4 -0
- package/dist/typeServer/typeUtils.js +31 -0
- package/dist/typeServer/typeUtils.js.map +1 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.d.ts +87 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.js +181 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CaseSensitivityDetector } from '../common/caseSensitivityDetector';
|
|
2
|
+
import { Uri } from '../common/uri/uri';
|
|
3
|
+
import { INotebookUriMapper } from './notebookUriMapper';
|
|
4
|
+
export declare function convertLspUriStringToUri(uri: string, caseDetector: CaseSensitivityDetector, mapper?: INotebookUriMapper): Uri;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* serverUtils.ts
|
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
|
5
|
+
* Licensed under the MIT license.
|
|
6
|
+
*
|
|
7
|
+
* Small server-side helpers ported from Pylance's `server/common`. Only the pieces the
|
|
8
|
+
* type-server core references live here.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.convertLspUriStringToUri = convertLspUriStringToUri;
|
|
12
|
+
const uri_1 = require("../common/uri/uri");
|
|
13
|
+
const notebookUriMapper_1 = require("./notebookUriMapper");
|
|
14
|
+
function convertLspUriStringToUri(uri, caseDetector, mapper) {
|
|
15
|
+
const parsed = uri_1.Uri.parse(uri, caseDetector);
|
|
16
|
+
if (mapper && notebookUriMapper_1.NotebookUriMapper.isNotebookCell(parsed)) {
|
|
17
|
+
return mapper.getMappedCellUri(parsed);
|
|
18
|
+
}
|
|
19
|
+
return parsed;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=serverUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverUtils.js","sourceRoot":"","sources":["../../../../../src/typeServer/serverUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAOH,4DAUC;AAdD,2CAAwC;AAExC,2DAA4E;AAE5E,SAAgB,wBAAwB,CACpC,GAAW,EACX,YAAqC,EACrC,MAA2B;IAE3B,MAAM,MAAM,GAAG,SAAG,CAAC,KAAK,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC5C,IAAI,MAAM,IAAI,qCAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;QACrD,OAAO,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT license.
|
|
4
|
+
*
|
|
5
|
+
* stubGenerator.ts
|
|
6
|
+
*
|
|
7
|
+
* Generates Python stub (.pyi) file content from Pyright function type information.
|
|
8
|
+
*/
|
|
9
|
+
import * as PyrightTypes from '../analyzer/types';
|
|
10
|
+
import { PythonVersion } from '../common/pythonVersion';
|
|
11
|
+
import { ITypeServerEvaluator } from './typeServerEvaluator';
|
|
12
|
+
/**
|
|
13
|
+
* Options for stub generation.
|
|
14
|
+
*/
|
|
15
|
+
export interface StubGenerationOptions {
|
|
16
|
+
pythonVersion: PythonVersion;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Result of stub generation including the stub content and metadata.
|
|
20
|
+
*/
|
|
21
|
+
export interface StubGenerationResult {
|
|
22
|
+
stubContent: string;
|
|
23
|
+
primaryDefinitionOffset: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function generateStubFromTypeVar(typeVar: PyrightTypes.TypeVarType, options: StubGenerationOptions): StubGenerationResult;
|
|
26
|
+
/**
|
|
27
|
+
* Generates a Python stub file (.pyi) from a Pyright FunctionType.
|
|
28
|
+
*
|
|
29
|
+
* @param type The Pyright function type
|
|
30
|
+
* @param options Generation options including Python version
|
|
31
|
+
* @returns Stub generation result with content and metadata
|
|
32
|
+
*/
|
|
33
|
+
export declare function generateStubFromFunctionType(evaluator: ITypeServerEvaluator, type: PyrightTypes.FunctionType, options: StubGenerationOptions): StubGenerationResult;
|
|
34
|
+
/**
|
|
35
|
+
* Generates a Python stub file (.pyi) from a Pyright ClassType.
|
|
36
|
+
*
|
|
37
|
+
* @param type The Pyright class type
|
|
38
|
+
* @param options Generation options including Python version
|
|
39
|
+
* @param targetMethodName If provided, marks this specific method as the primary definition
|
|
40
|
+
* @returns Stub generation result with content and metadata
|
|
41
|
+
*/
|
|
42
|
+
export declare function generateStubFromClassType(evaluator: ITypeServerEvaluator, type: PyrightTypes.ClassType, options: StubGenerationOptions, targetMethodName?: string): StubGenerationResult;
|