@zzzen/pyright-internal 1.2.0-dev.20260628 → 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.
Files changed (116) hide show
  1. package/dist/analyzer/binder.js +51 -5
  2. package/dist/analyzer/binder.js.map +1 -1
  3. package/dist/analyzer/checker.js +12 -2
  4. package/dist/analyzer/checker.js.map +1 -1
  5. package/dist/analyzer/dataClasses.js +7 -0
  6. package/dist/analyzer/dataClasses.js.map +1 -1
  7. package/dist/analyzer/typeUtils.js +10 -4
  8. package/dist/analyzer/typeUtils.js.map +1 -1
  9. package/dist/localization/localize.d.ts +3 -0
  10. package/dist/localization/localize.js +1 -0
  11. package/dist/localization/localize.js.map +1 -1
  12. package/dist/localization/package.nls.en-us.json +1 -0
  13. package/dist/tests/fourslash/completions.qualname.fourslash.d.ts +1 -0
  14. package/dist/tests/fourslash/completions.qualname.fourslash.js +34 -0
  15. package/dist/tests/fourslash/completions.qualname.fourslash.js.map +1 -0
  16. package/dist/tests/fourslash/import.multipartModuleClassShadow.fourslash.d.ts +1 -0
  17. package/dist/tests/fourslash/import.multipartModuleClassShadow.fourslash.js +39 -0
  18. package/dist/tests/fourslash/import.multipartModuleClassShadow.fourslash.js.map +1 -0
  19. package/dist/tests/typeEvaluator3.test.js +1 -1
  20. package/dist/tests/typeEvaluator4.test.js +1 -1
  21. package/dist/tests/typeEvaluator6.test.js +20 -0
  22. package/dist/tests/typeEvaluator6.test.js.map +1 -1
  23. package/dist/tests/typeServer/inProcTypeServerTestUtils.d.ts +39 -0
  24. package/dist/tests/typeServer/inProcTypeServerTestUtils.js +366 -0
  25. package/dist/tests/typeServer/inProcTypeServerTestUtils.js.map +1 -0
  26. package/dist/tests/typeServer/notebook.typeServer.test.d.ts +1 -0
  27. package/dist/tests/typeServer/notebook.typeServer.test.js +315 -0
  28. package/dist/tests/typeServer/notebook.typeServer.test.js.map +1 -0
  29. package/dist/tests/typeServer/typeServer.inProc.test.d.ts +1 -0
  30. package/dist/tests/typeServer/typeServer.inProc.test.js +234 -0
  31. package/dist/tests/typeServer/typeServer.inProc.test.js.map +1 -0
  32. package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.d.ts +1 -0
  33. package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.js +298 -0
  34. package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.js.map +1 -0
  35. package/dist/typeServer/cancellation.d.ts +5 -0
  36. package/dist/typeServer/cancellation.js +14 -0
  37. package/dist/typeServer/cancellation.js.map +1 -0
  38. package/dist/typeServer/diagnosticUtils.d.ts +4 -0
  39. package/dist/typeServer/diagnosticUtils.js +71 -0
  40. package/dist/typeServer/diagnosticUtils.js.map +1 -0
  41. package/dist/typeServer/enums.d.ts +14 -0
  42. package/dist/typeServer/enums.js +524 -0
  43. package/dist/typeServer/enums.js.map +1 -0
  44. package/dist/typeServer/eventEmitter.d.ts +12 -0
  45. package/dist/typeServer/eventEmitter.js +32 -0
  46. package/dist/typeServer/eventEmitter.js.map +1 -0
  47. package/dist/typeServer/nodeMain.d.ts +1 -0
  48. package/dist/typeServer/nodeMain.js +65 -0
  49. package/dist/typeServer/nodeMain.js.map +1 -0
  50. package/dist/typeServer/notebookCellChain.d.ts +34 -0
  51. package/dist/typeServer/notebookCellChain.js +182 -0
  52. package/dist/typeServer/notebookCellChain.js.map +1 -0
  53. package/dist/typeServer/notebookDocumentHandler.d.ts +23 -0
  54. package/dist/typeServer/notebookDocumentHandler.js +158 -0
  55. package/dist/typeServer/notebookDocumentHandler.js.map +1 -0
  56. package/dist/typeServer/notebookUriMapper.d.ts +39 -0
  57. package/dist/typeServer/notebookUriMapper.js +164 -0
  58. package/dist/typeServer/notebookUriMapper.js.map +1 -0
  59. package/dist/typeServer/profilingStub.d.ts +10 -0
  60. package/dist/typeServer/profilingStub.js +12 -0
  61. package/dist/typeServer/profilingStub.js.map +1 -0
  62. package/dist/typeServer/programTypes.d.ts +136 -0
  63. package/dist/typeServer/programTypes.js +3 -0
  64. package/dist/typeServer/programTypes.js.map +1 -0
  65. package/dist/typeServer/programWrapper.d.ts +134 -0
  66. package/dist/typeServer/programWrapper.js +731 -0
  67. package/dist/typeServer/programWrapper.js.map +1 -0
  68. package/dist/typeServer/protocol/tspSupplemental.d.ts +43 -0
  69. package/dist/typeServer/protocol/tspSupplemental.js +48 -0
  70. package/dist/typeServer/protocol/tspSupplemental.js.map +1 -0
  71. package/dist/typeServer/protocol/typeServerProtocol.d.ts +1102 -0
  72. package/dist/typeServer/protocol/typeServerProtocol.js +290 -0
  73. package/dist/typeServer/protocol/typeServerProtocol.js.map +1 -0
  74. package/dist/typeServer/server.d.ts +54 -0
  75. package/dist/typeServer/server.js +620 -0
  76. package/dist/typeServer/server.js.map +1 -0
  77. package/dist/typeServer/serverUtils.d.ts +4 -0
  78. package/dist/typeServer/serverUtils.js +21 -0
  79. package/dist/typeServer/serverUtils.js.map +1 -0
  80. package/dist/typeServer/stubGenerator.d.ts +42 -0
  81. package/dist/typeServer/stubGenerator.js +895 -0
  82. package/dist/typeServer/stubGenerator.js.map +1 -0
  83. package/dist/typeServer/typeCache.d.ts +31 -0
  84. package/dist/typeServer/typeCache.js +54 -0
  85. package/dist/typeServer/typeCache.js.map +1 -0
  86. package/dist/typeServer/typeEvalUtils.d.ts +13 -0
  87. package/dist/typeServer/typeEvalUtils.js +83 -0
  88. package/dist/typeServer/typeEvalUtils.js.map +1 -0
  89. package/dist/typeServer/typeGuards.d.ts +3 -0
  90. package/dist/typeServer/typeGuards.js +55 -0
  91. package/dist/typeServer/typeGuards.js.map +1 -0
  92. package/dist/typeServer/typeServerConversionTypes.d.ts +39 -0
  93. package/dist/typeServer/typeServerConversionTypes.js +448 -0
  94. package/dist/typeServer/typeServerConversionTypes.js.map +1 -0
  95. package/dist/typeServer/typeServerConversionUtils.d.ts +35 -0
  96. package/dist/typeServer/typeServerConversionUtils.js +524 -0
  97. package/dist/typeServer/typeServerConversionUtils.js.map +1 -0
  98. package/dist/typeServer/typeServerEvaluator.d.ts +16 -0
  99. package/dist/typeServer/typeServerEvaluator.js +36 -0
  100. package/dist/typeServer/typeServerEvaluator.js.map +1 -0
  101. package/dist/typeServer/typeServerFileSystem.d.ts +47 -0
  102. package/dist/typeServer/typeServerFileSystem.js +129 -0
  103. package/dist/typeServer/typeServerFileSystem.js.map +1 -0
  104. package/dist/typeServer/typeServerProtocolUtils.d.ts +2 -0
  105. package/dist/typeServer/typeServerProtocolUtils.js +7 -0
  106. package/dist/typeServer/typeServerProtocolUtils.js.map +1 -0
  107. package/dist/typeServer/typeServerServiceKeys.d.ts +7 -0
  108. package/dist/typeServer/typeServerServiceKeys.js +20 -0
  109. package/dist/typeServer/typeServerServiceKeys.js.map +1 -0
  110. package/dist/typeServer/typeUtils.d.ts +4 -0
  111. package/dist/typeServer/typeUtils.js +31 -0
  112. package/dist/typeServer/typeUtils.js.map +1 -0
  113. package/dist/typeServer/virtualFileOverlayFileSystem.d.ts +87 -0
  114. package/dist/typeServer/virtualFileOverlayFileSystem.js +181 -0
  115. package/dist/typeServer/virtualFileOverlayFileSystem.js.map +1 -0
  116. package/package.json +1 -1
@@ -0,0 +1,315 @@
1
+ "use strict";
2
+ /*
3
+ * notebook.typeServer.test.ts
4
+ * Copyright (c) Microsoft Corporation.
5
+ * Licensed under the MIT license.
6
+ *
7
+ * Tests for the type server's notebook cell-chain maintenance (NotebookUriMapper +
8
+ * createNotebookData / openNotebookCellChain / updateNotebookStructure).
9
+ *
10
+ * This is a Pyright-native port of Pylance's `notebook.common.ts`. It exercises only the
11
+ * cell-chain core functions against a real AnalyzerService; it does not drive the notebook
12
+ * document handler (which just sequences calls to these same functions).
13
+ */
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
27
+ }) : function(o, v) {
28
+ o["default"] = v;
29
+ });
30
+ var __importStar = (this && this.__importStar) || (function () {
31
+ var ownKeys = function(o) {
32
+ ownKeys = Object.getOwnPropertyNames || function (o) {
33
+ var ar = [];
34
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
+ return ar;
36
+ };
37
+ return ownKeys(o);
38
+ };
39
+ return function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ })();
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
49
+ const service_1 = require("../../analyzer/service");
50
+ const sourceFile_1 = require("../../analyzer/sourceFile");
51
+ const commandLineOptions_1 = require("../../common/commandLineOptions");
52
+ const console_1 = require("../../common/console");
53
+ const pathUtils_1 = require("../../common/pathUtils");
54
+ const serviceKeys_1 = require("../../common/serviceKeys");
55
+ const serviceProviderExtensions_1 = require("../../common/serviceProviderExtensions");
56
+ const uri_1 = require("../../common/uri/uri");
57
+ const pyrightFileSystem_1 = require("../../pyrightFileSystem");
58
+ const notebookCellChain_1 = require("../../typeServer/notebookCellChain");
59
+ const notebookUriMapper_1 = require("../../typeServer/notebookUriMapper");
60
+ const workspaceFactory_1 = require("../../workspaceFactory");
61
+ const host = __importStar(require("../harness/testHost"));
62
+ const factory_1 = require("../harness/vfs/factory");
63
+ describe('updateNotebookStructure Tests (typeServer mode)', () => {
64
+ const testFileSystem = (0, factory_1.createFromFileSystem)(host.HOST, /* ignoreCase */ false, {
65
+ cwd: (0, pathUtils_1.normalizeSlashes)('/'),
66
+ });
67
+ const fileSystem = new pyrightFileSystem_1.PyrightFileSystem(testFileSystem);
68
+ const serviceProvider = (0, serviceProviderExtensions_1.createServiceProvider)(testFileSystem, fileSystem);
69
+ let uriMapper;
70
+ let analyzerService;
71
+ let workspace;
72
+ const notebookUriString = 'file:///notebook.ipynb';
73
+ const notebookUri = uri_1.Uri.parse(notebookUriString, serviceProvider);
74
+ beforeEach(() => {
75
+ uriMapper = new notebookUriMapper_1.NotebookUriMapper(serviceProvider.get(serviceKeys_1.ServiceKeys.caseSensitivityDetector));
76
+ analyzerService = new service_1.AnalyzerService('name', serviceProvider, {
77
+ console: new console_1.NullConsole(),
78
+ shouldRunAnalysis: () => true,
79
+ });
80
+ // Don't run analysis automatically.
81
+ const options = new commandLineOptions_1.CommandLineOptions((0, pathUtils_1.normalizeSlashes)('/src'), false);
82
+ options.languageServerSettings.enableAmbientAnalysis = false;
83
+ analyzerService.setOptions(options);
84
+ workspace = {
85
+ workspaceName: 'name',
86
+ rootUri: uri_1.Uri.file('/src', serviceProvider),
87
+ kinds: [workspaceFactory_1.WellKnownWorkspaceKinds.Regular],
88
+ service: analyzerService,
89
+ disableLanguageServices: false,
90
+ disableOrganizeImports: false,
91
+ disableWorkspaceSymbol: false,
92
+ isInitialized: (0, workspaceFactory_1.createInitStatus)(),
93
+ searchPathsToWatch: [],
94
+ disableTaggedHints: false,
95
+ };
96
+ });
97
+ afterEach(() => {
98
+ analyzerService.dispose();
99
+ });
100
+ test('delete cell', () => {
101
+ const nd = _setupWorkspace(notebookUriString, [
102
+ _createCellUri('one'),
103
+ _createCellUri('two'),
104
+ _createCellUri('three'),
105
+ ]);
106
+ const structure = {
107
+ array: { start: 1, deleteCount: 1 },
108
+ didOpen: undefined,
109
+ didClose: [{ uri: _createCellUri('two') }],
110
+ };
111
+ _applyChange(notebookUriString, structure);
112
+ (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace);
113
+ _verifyUris(nd.mappedCellUris, [_createCellFilePath('one'), _createCellFilePath('three')]);
114
+ expect(analyzerService.hasSourceFile(_createCellFilePath('two'))).toBe(false);
115
+ });
116
+ test('delete top cell', () => {
117
+ const nd = _setupWorkspace(notebookUriString, [
118
+ _createCellUri('one'),
119
+ _createCellUri('two'),
120
+ _createCellUri('three'),
121
+ ]);
122
+ const structure = {
123
+ array: { start: 0, deleteCount: 1 },
124
+ didOpen: undefined,
125
+ didClose: [{ uri: _createCellUri('one') }],
126
+ };
127
+ _applyChange(notebookUriString, structure);
128
+ (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace);
129
+ _verifyUris(nd.mappedCellUris, [_createCellFilePath('two'), _createCellFilePath('three')]);
130
+ expect(analyzerService.hasSourceFile(_createCellFilePath('one'))).toBe(false);
131
+ });
132
+ test('insert cell', () => {
133
+ const nd = _setupWorkspace(notebookUriString, [_createCellUri('one'), _createCellUri('two')]);
134
+ const structure = {
135
+ array: {
136
+ cells: [{ kind: vscode_languageserver_protocol_1.NotebookCellKind.Code, document: _createCellUri('new') }],
137
+ start: 1,
138
+ deleteCount: 0,
139
+ },
140
+ didOpen: [{ uri: _createCellUri('new'), languageId: 'python', version: 1, text: '' }],
141
+ didClose: undefined,
142
+ };
143
+ _applyChange(notebookUriString, structure);
144
+ (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace);
145
+ _verifyUris(nd.mappedCellUris, [
146
+ _createCellFilePath('one'),
147
+ _createCellFilePath('new'),
148
+ _createCellFilePath('two'),
149
+ ]);
150
+ expect(analyzerService.hasSourceFile(_createCellFilePath('new'))).toBe(true);
151
+ expect(analyzerService.getChainedUri(_createCellFilePath('new'))?.equals(_createCellFilePath('one'))).toBe(true);
152
+ });
153
+ test('reorder cell', () => {
154
+ const nd = _setupWorkspace(notebookUriString, [
155
+ _createCellUri('one'),
156
+ _createCellUri('two'),
157
+ _createCellUri('three'),
158
+ ]);
159
+ const structure = {
160
+ array: {
161
+ cells: [
162
+ { kind: vscode_languageserver_protocol_1.NotebookCellKind.Code, document: _createCellUri('three') },
163
+ { kind: vscode_languageserver_protocol_1.NotebookCellKind.Code, document: _createCellUri('two') },
164
+ ],
165
+ start: 1,
166
+ deleteCount: 2,
167
+ },
168
+ didOpen: undefined,
169
+ didClose: undefined,
170
+ };
171
+ _applyChange(notebookUriString, structure);
172
+ (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace);
173
+ _verifyUris(nd.mappedCellUris, [
174
+ _createCellFilePath('one'),
175
+ _createCellFilePath('three'),
176
+ _createCellFilePath('two'),
177
+ ]);
178
+ expect(analyzerService.getChainedUri(_createCellFilePath('two'))?.equals(_createCellFilePath('three'))).toBe(true);
179
+ expect(analyzerService.getChainedUri(_createCellFilePath('three'))?.equals(_createCellFilePath('one'))).toBe(true);
180
+ });
181
+ test('repair if duplicate cell detected', () => {
182
+ const nd = _setupWorkspace(notebookUriString, [_createCellUri('one'), _createCellUri('two')]);
183
+ const structure = {
184
+ array: {
185
+ cells: [{ kind: vscode_languageserver_protocol_1.NotebookCellKind.Code, document: _createCellUri('one') }],
186
+ start: 2,
187
+ deleteCount: 0,
188
+ },
189
+ didOpen: [{ uri: _createCellUri('one'), languageId: 'python', version: 1, text: '' }],
190
+ didClose: undefined,
191
+ };
192
+ _applyChange(notebookUriString, structure);
193
+ // Should not throw; instead it should repair the chain by removing the duplicate.
194
+ expect(() => (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace)).not.toThrow();
195
+ // The duplicate entry should have been removed, leaving only the original two cells.
196
+ _verifyUris(nd.mappedCellUris, [_createCellFilePath('one'), _createCellFilePath('two')]);
197
+ });
198
+ test('delete last cell', () => {
199
+ const nd = _setupWorkspace(notebookUriString, [
200
+ _createCellUri('one'),
201
+ _createCellUri('two'),
202
+ _createCellUri('three'),
203
+ ]);
204
+ const structure = {
205
+ array: { start: 2, deleteCount: 1 },
206
+ didOpen: undefined,
207
+ didClose: [{ uri: _createCellUri('three') }],
208
+ };
209
+ _applyChange(notebookUriString, structure);
210
+ (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace);
211
+ _verifyUris(nd.mappedCellUris, [_createCellFilePath('one'), _createCellFilePath('two')]);
212
+ expect(analyzerService.hasSourceFile(_createCellFilePath('three'))).toBe(false);
213
+ // The chain should remain intact after the last cell is deleted: prefix → one → two
214
+ expect(analyzerService.getChainedUri(_createCellFilePath('two'))?.equals(_createCellFilePath('one'))).toBe(true);
215
+ expect(analyzerService.getChainedUri(_createCellFilePath('one'))?.equals(nd.prefixCellUri)).toBe(true);
216
+ });
217
+ test('delete and create cells', () => {
218
+ const nd = _setupWorkspace(notebookUriString, [_createCellUri('one')]);
219
+ const structure = {
220
+ array: {
221
+ cells: [{ kind: vscode_languageserver_protocol_1.NotebookCellKind.Code, document: _createCellUri('new') }],
222
+ start: 0,
223
+ deleteCount: 1,
224
+ },
225
+ didOpen: [{ uri: _createCellUri('new'), languageId: 'python', version: 1, text: '' }],
226
+ didClose: [{ uri: _createCellUri('one') }],
227
+ };
228
+ _applyChange(notebookUriString, structure);
229
+ (0, notebookCellChain_1.updateNotebookStructure)(structure, nd, uriMapper, workspace);
230
+ _verifyUris(nd.mappedCellUris, [_createCellFilePath('new')]);
231
+ expect(analyzerService.hasSourceFile(_createCellFilePath('new'))).toBe(true);
232
+ expect(analyzerService.getChainedUri(_createCellFilePath('new'))?.equals(nd.prefixCellUri)).toBe(true);
233
+ });
234
+ test('unused symbol in chained source file', () => {
235
+ _setupWorkspace(notebookUriString, [_createCellUri('one'), _createCellUri('two'), _createCellUri('three')]);
236
+ const source1 = workspace.service.test_program.getBoundSourceFileInfo(_createCellFilePath('one'));
237
+ const source2 = workspace.service.test_program.getBoundSourceFileInfo(_createCellFilePath('two'));
238
+ const source3 = workspace.service.test_program.getBoundSourceFileInfo(_createCellFilePath('three'));
239
+ // Since we created the workspace for tests, some flags that would be set when
240
+ // workspace.getSettings is called are not set. Manually set them here.
241
+ source1.isTracked = true;
242
+ source2.isTracked = true;
243
+ source3.isTracked = true;
244
+ _updateCellContent('one', 'import os');
245
+ expect(source1.sourceFile
246
+ .getDiagnostics(workspace.service.getConfigOptions())
247
+ ?.some((d) => d.category === 3 /* DiagnosticCategory.UnusedCode */)).toBe(true);
248
+ _updateCellContent('two', 'os');
249
+ expect(source1.sourceFile
250
+ .getDiagnostics(workspace.service.getConfigOptions())
251
+ ?.some((d) => d.category === 3 /* DiagnosticCategory.UnusedCode */)).toBe(false);
252
+ _updateCellContent('one', 'import os\nimport sys');
253
+ expect(source1.sourceFile
254
+ .getDiagnostics(workspace.service.getConfigOptions())
255
+ ?.some((d) => d.category === 3 /* DiagnosticCategory.UnusedCode */)).toBe(true);
256
+ _updateCellContent('three', 'sys');
257
+ expect(source1.sourceFile
258
+ .getDiagnostics(workspace.service.getConfigOptions())
259
+ ?.some((d) => d.category === 3 /* DiagnosticCategory.UnusedCode */)).toBe(false);
260
+ _updateCellContent('two', '');
261
+ expect(source1.sourceFile
262
+ .getDiagnostics(workspace.service.getConfigOptions())
263
+ ?.some((d) => d.category === 3 /* DiagnosticCategory.UnusedCode */)).toBe(true);
264
+ });
265
+ function _updateCellContent(cellName, text) {
266
+ const filePath = _createCellFilePath(cellName);
267
+ const source = workspace.service.test_program.getBoundSourceFileInfo(filePath);
268
+ workspace.service.updateOpenFileContents(filePath, (source.sourceFile.getClientVersion() ?? 0) + 1, text, sourceFile_1.IPythonMode.CellDocs);
269
+ while (workspace.service.test_program.analyze())
270
+ ;
271
+ }
272
+ function _setupWorkspace(notebookUri, cellFileUris) {
273
+ const cells = cellFileUris.map((uri) => vscode_languageserver_protocol_1.TextDocumentItem.create(uri, 'python', 1, ''));
274
+ const params = {
275
+ notebookDocument: {
276
+ notebookType: 'jupyter-notebook',
277
+ uri: notebookUri,
278
+ version: 1,
279
+ cells: cells.map((cell) => ({ kind: vscode_languageserver_protocol_1.NotebookCellKind.Code, document: cell.uri })),
280
+ },
281
+ cellTextDocuments: cells,
282
+ };
283
+ const notebookPath = uriMapper.parseNotebookOpen(params);
284
+ const notebookData = (0, notebookCellChain_1.createNotebookData)(notebookPath, cells, uriMapper, serviceProvider.get(serviceKeys_1.ServiceKeys.caseSensitivityDetector));
285
+ (0, notebookCellChain_1.openNotebookCellChain)(cells, notebookData, uriMapper, workspace);
286
+ return notebookData;
287
+ }
288
+ function _applyChange(notebookUri, structure) {
289
+ const params = {
290
+ notebookDocument: {
291
+ uri: notebookUri,
292
+ version: 2,
293
+ },
294
+ change: {
295
+ cells: {
296
+ structure,
297
+ },
298
+ },
299
+ };
300
+ uriMapper.parseNotebookChange(params);
301
+ }
302
+ function _createCellUri(cell) {
303
+ return `vscode-notebook-cell:notebook.ipynb#${cell}`;
304
+ }
305
+ function _createCellFilePath(cell) {
306
+ return notebookUri.addExtension('.py').withFragment(cell);
307
+ }
308
+ function _verifyUris(actual, expected) {
309
+ expect(actual.length).toBe(expected.length);
310
+ for (let i = 0; i < actual.length; i++) {
311
+ expect(actual[i].equals(expected[i])).toBe(true);
312
+ }
313
+ }
314
+ });
315
+ //# sourceMappingURL=notebook.typeServer.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notebook.typeServer.test.js","sourceRoot":"","sources":["../../../../../../src/tests/typeServer/notebook.typeServer.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mFAMwC;AAExC,oDAAyD;AACzD,0DAAwD;AACxD,wEAAqE;AACrE,kDAAmD;AAEnD,sDAA0D;AAC1D,0DAAuD;AACvD,sFAA+E;AAC/E,8CAA2C;AAC3C,+DAA4D;AAC5D,0EAAwH;AACxH,0EAAuE;AACvE,6DAA8F;AAC9F,0DAA4C;AAC5C,oDAA8D;AAE9D,QAAQ,CAAC,iDAAiD,EAAE,GAAG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E,WAAW;gBAChB,OAAO,EAAE,CAAC;aACb;YACD,MAAM,EAAE;gBACJ,KAAK,EAAE;oBACH,SAAS;iBACZ;aACJ;SACJ,CAAC;QACF,SAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,SAAS,cAAc,CAAC,IAAY;QAChC,OAAO,uCAAuC,IAAI,EAAE,CAAC;IACzD,CAAC;IAED,SAAS,mBAAmB,CAAC,IAAY;QACrC,OAAO,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,SAAS,WAAW,CAAC,MAAa,EAAE,QAAe;QAC/C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;IACL,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ /*
3
+ * typeServer.inProc.test.ts
4
+ * Copyright (c) Microsoft Corporation.
5
+ * Licensed under the MIT license.
6
+ *
7
+ * In-process protocol tests for the Pyright type server (TSP).
8
+ *
9
+ * These exercise the server-side request handlers end-to-end over a real JSON-RPC
10
+ * connection (in-memory streams), including the `_onGetType` conversion path
11
+ * (fromProtocolNode -> evaluate via the sync->async adapter -> ProtocolTypeFactory).
12
+ *
13
+ * Ported from Pylance's `typeServer.inProc.test.ts`. The Pylance round-trip tests that
14
+ * reconstruct a Pyright `Type` from the protocol `Type` depend on the client-side consumer
15
+ * stack (ExternalProgram / snapshotSync), which stays in Pylance, so they are intentionally
16
+ * not ported here. Instead these tests assert on the protocol-level responses.
17
+ */
18
+ var __importDefault = (this && this.__importDefault) || function (mod) {
19
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const assert_1 = __importDefault(require("assert"));
23
+ const typeServerProtocol_1 = require("../../typeServer/protocol/typeServerProtocol");
24
+ const inProcTypeServerTestUtils_1 = require("./inProcTypeServerTestUtils");
25
+ jest.setTimeout(120000);
26
+ /** Extract the class name from a protocol Type, if it's a ClassType with a regular declaration. */
27
+ function getClassTypeName(type) {
28
+ if (!type || type.kind !== 3 /* TypeServerProtocol.TypeKind.Class */) {
29
+ return undefined;
30
+ }
31
+ const classType = type;
32
+ if (classType.declaration.kind === 0 /* TypeServerProtocol.DeclarationKind.Regular */) {
33
+ return classType.declaration.name;
34
+ }
35
+ return undefined;
36
+ }
37
+ describe('TypeServer in-proc protocol', () => {
38
+ beforeAll(async () => {
39
+ await (0, inProcTypeServerTestUtils_1.initializeDependenciesForInProcTests)();
40
+ });
41
+ test('initialize + get supported protocol version + snapshot', async () => {
42
+ const code = `
43
+ // @filename: main.py
44
+ //// x = 1
45
+ `;
46
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
47
+ const version = await context.sendRequest(typeServerProtocol_1.TypeServerProtocol.GetSupportedProtocolVersionRequest.type);
48
+ (0, assert_1.default)(version.length > 0);
49
+ const snapshot = await context.refreshSnapshot();
50
+ (0, assert_1.default)(snapshot >= 0);
51
+ });
52
+ });
53
+ test('resolveImport resolves a local module', async () => {
54
+ const code = `
55
+ // @filename: main.py
56
+ //// # /*src*/
57
+ //// import foo
58
+ //// x = foo.value
59
+ // @filename: foo.py
60
+ //// value = 1
61
+ `;
62
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
63
+ const resolvedUri = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.ResolveImportRequest.type, {
64
+ sourceUri: context.getFileUriForMarker('src').toString(),
65
+ moduleDescriptor: { leadingDots: 0, nameParts: ['foo'] },
66
+ });
67
+ (0, assert_1.default)(resolvedUri !== undefined);
68
+ (0, assert_1.default)(resolvedUri.endsWith('/src/foo.py'));
69
+ });
70
+ });
71
+ test('getPythonSearchPaths returns an array', async () => {
72
+ const code = `
73
+ // @filename: main.py
74
+ //// # /*src*/
75
+ //// x = 1
76
+ `;
77
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
78
+ const paths = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.GetPythonSearchPathsRequest.type, {
79
+ fromUri: context.getFileUriForMarker('src').getDirectory().toString(),
80
+ });
81
+ (0, assert_1.default)(Array.isArray(paths));
82
+ (0, assert_1.default)(paths.every((p) => typeof p === 'string'));
83
+ });
84
+ });
85
+ test('resolveImport resolves a relative module', async () => {
86
+ const code = `
87
+ // @filename: pkg/__init__.py
88
+ ////
89
+ // @filename: pkg/main.py
90
+ //// # /*src*/
91
+ //// from . import foo
92
+ //// x = foo.value
93
+ // @filename: pkg/foo.py
94
+ //// value = 1
95
+ `;
96
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
97
+ const resolvedUri = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.ResolveImportRequest.type, {
98
+ sourceUri: context.getFileUriForMarker('src').toString(),
99
+ moduleDescriptor: { leadingDots: 1, nameParts: ['foo'] },
100
+ });
101
+ (0, assert_1.default)(resolvedUri !== undefined);
102
+ (0, assert_1.default)(resolvedUri.endsWith('/src/pkg/foo.py'));
103
+ });
104
+ });
105
+ test('resolveImport resolves stdlib module from typeshed-fallback', async () => {
106
+ const code = `
107
+ // @filename: main.py
108
+ //// # /*src*/
109
+ //// import typing
110
+ //// x = typing.Any
111
+ `;
112
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
113
+ const resolvedUri = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.ResolveImportRequest.type, {
114
+ sourceUri: context.getFileUriForMarker('src').toString(),
115
+ moduleDescriptor: { leadingDots: 0, nameParts: ['typing'] },
116
+ });
117
+ (0, assert_1.default)(resolvedUri !== undefined);
118
+ // The exact URI scheme can vary depending on FS mapping; the key is that this came from typeshed.
119
+ (0, assert_1.default)(resolvedUri.includes('/typeshed-fallback/stdlib/typing.pyi'));
120
+ });
121
+ });
122
+ test('resolveImport resolves builtins module from typeshed-fallback', async () => {
123
+ const code = `
124
+ // @filename: main.py
125
+ //// # /*src*/
126
+ //// import builtins
127
+ //// x = builtins.int
128
+ `;
129
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
130
+ const resolvedUri = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.ResolveImportRequest.type, {
131
+ sourceUri: context.getFileUriForMarker('src').toString(),
132
+ moduleDescriptor: { leadingDots: 0, nameParts: ['builtins'] },
133
+ });
134
+ (0, assert_1.default)(resolvedUri !== undefined);
135
+ (0, assert_1.default)(resolvedUri.includes('/typeshed-fallback/stdlib/builtins.pyi'));
136
+ });
137
+ });
138
+ test('resolveImport resolves stdlib submodule from typeshed-fallback', async () => {
139
+ const code = `
140
+ // @filename: main.py
141
+ //// # /*src*/
142
+ //// import collections.abc
143
+ //// x = collections.abc.Iterable
144
+ `;
145
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
146
+ const resolvedUri = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.ResolveImportRequest.type, {
147
+ sourceUri: context.getFileUriForMarker('src').toString(),
148
+ moduleDescriptor: { leadingDots: 0, nameParts: ['collections', 'abc'] },
149
+ });
150
+ (0, assert_1.default)(resolvedUri !== undefined);
151
+ (0, assert_1.default)(resolvedUri.includes('/typeshed-fallback/stdlib/collections/abc.pyi'));
152
+ });
153
+ });
154
+ test('getComputedType returns a type for a node', async () => {
155
+ const code = `
156
+ // @filename: main.py
157
+ //// def takes_int(x: int) -> None:
158
+ //// pass
159
+ ////
160
+ //// [|/*arg*/__arg__|] = 1
161
+ //// takes_int(__arg__)
162
+ `;
163
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
164
+ await context.openFileForMarker('arg');
165
+ const arg = context.getNodeForMarker('arg');
166
+ await context.refreshSnapshot();
167
+ const type = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.GetComputedTypeRequest.type, {
168
+ arg,
169
+ });
170
+ (0, assert_1.default)(type !== undefined);
171
+ (0, assert_1.default)(typeof type.id === 'number');
172
+ assert_1.default.strictEqual(type.kind, 3 /* TypeServerProtocol.TypeKind.Class */);
173
+ assert_1.default.strictEqual(getClassTypeName(type), 'int');
174
+ });
175
+ });
176
+ test('getExpectedType returns a type for a node', async () => {
177
+ const code = `
178
+ // @filename: main.py
179
+ //// class C:
180
+ //// pass
181
+ ////
182
+ //// x: C = [|/*expr*/C()|]
183
+ `;
184
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
185
+ await context.openFileForMarker('expr');
186
+ const arg = context.getNodeForMarker('expr');
187
+ await context.refreshSnapshot();
188
+ const type = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.GetExpectedTypeRequest.type, {
189
+ arg,
190
+ });
191
+ (0, assert_1.default)(type !== undefined);
192
+ (0, assert_1.default)(typeof type.id === 'number');
193
+ assert_1.default.strictEqual(type.kind, 3 /* TypeServerProtocol.TypeKind.Class */);
194
+ assert_1.default.strictEqual(getClassTypeName(type), 'C');
195
+ });
196
+ });
197
+ test('getDeclaredType returns a type for an annotated symbol', async () => {
198
+ const code = `
199
+ // @filename: main.py
200
+ //// [|/*decl*/__declared__|]: str = 'x'
201
+ `;
202
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
203
+ await context.openFileForMarker('decl');
204
+ const arg = context.getNodeForMarker('decl');
205
+ await context.refreshSnapshot();
206
+ const type = await context.sendRequestWithSnapshot(typeServerProtocol_1.TypeServerProtocol.GetDeclaredTypeRequest.type, {
207
+ arg,
208
+ });
209
+ (0, assert_1.default)(type !== undefined);
210
+ (0, assert_1.default)(typeof type.id === 'number');
211
+ assert_1.default.strictEqual(type.kind, 3 /* TypeServerProtocol.TypeKind.Class */);
212
+ assert_1.default.strictEqual(getClassTypeName(type), 'str');
213
+ });
214
+ });
215
+ test('snapshotChanged notification is delivered', async () => {
216
+ const code = `
217
+ // @filename: main.py
218
+ //// [|/*open*/|]x = 1
219
+ `;
220
+ await (0, inProcTypeServerTestUtils_1.withInProcTypeServer)(code, async (context) => {
221
+ const initialSnapshot = await context.refreshSnapshot();
222
+ const received = new Promise((resolve) => {
223
+ context.onNotification(typeServerProtocol_1.TypeServerProtocol.SnapshotChangedNotification.type, (params) => {
224
+ resolve(params);
225
+ });
226
+ });
227
+ await context.openFileForMarker('open');
228
+ const params = await received;
229
+ (0, assert_1.default)(params.new > params.old);
230
+ (0, assert_1.default)(params.old >= initialSnapshot);
231
+ });
232
+ });
233
+ });
234
+ //# sourceMappingURL=typeServer.inProc.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeServer.inProc.test.js","sourceRoot":"","sources":["../../../../../../src/tests/typeServer/typeServer.inProc.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;AAEH,oDAA4B;AAE5B,qFAAkF;AAClF,2EAAyG;AAEzG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAExB,mGAAmG;AACnG,SAAS,gBAAgB,CAAC,IAAyC;IAC/D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,8CAAsC,EAAE,CAAC;QAC3D,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,SAAS,GAAG,IAAoC,CAAC;IACvD,IAAI,SAAS,CAAC,WAAW,CAAC,IAAI,uDAA+C,EAAE,CAA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