basedpyright 1.17.2__py3-none-any.whl → 1.17.3__py3-none-any.whl
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.
- basedpyright/dist/pyright-langserver.js +10 -7
- basedpyright/dist/pyright-langserver.js.map +1 -1
- basedpyright/dist/pyright.js +1 -1
- {basedpyright-1.17.2.dist-info → basedpyright-1.17.3.dist-info}/METADATA +1 -4
- {basedpyright-1.17.2.dist-info → basedpyright-1.17.3.dist-info}/RECORD +8 -8
- {basedpyright-1.17.2.dist-info → basedpyright-1.17.3.dist-info}/WHEEL +0 -0
- {basedpyright-1.17.2.dist-info → basedpyright-1.17.3.dist-info}/entry_points.txt +0 -0
- {basedpyright-1.17.2.dist-info → basedpyright-1.17.3.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -84279,9 +84279,11 @@ class TypeInlayHintsWalker extends parseTreeWalker_1.ParseTreeWalker {
|
|
|
84279
84279
|
this._checkInRange = (node) => !this._range || textRange_1.TextRange.overlapsRange(this._range, textRange_1.TextRange.create(node.start, node.length));
|
|
84280
84280
|
this._printType = (type) => this._program.evaluator.printType(type, { enforcePythonSyntax: true });
|
|
84281
84281
|
this.parseResults = this._program.getParseResults(fileUri);
|
|
84282
|
-
|
|
84283
|
-
|
|
84284
|
-
|
|
84282
|
+
if (this.parseResults) {
|
|
84283
|
+
const lines = this.parseResults.tokenizerOutput.lines;
|
|
84284
|
+
if (range && lines) {
|
|
84285
|
+
this._range = (0, positionUtils_1.convertRangeToTextRange)(range, lines);
|
|
84286
|
+
}
|
|
84285
84287
|
}
|
|
84286
84288
|
}
|
|
84287
84289
|
visitName(node) {
|
|
@@ -110672,13 +110674,14 @@ class InlayHintsProvider {
|
|
|
110672
110674
|
this._walker = new typeInlayHintsWalker_1.TypeInlayHintsWalker(this._program, fileUri, range);
|
|
110673
110675
|
}
|
|
110674
110676
|
async onInlayHints() {
|
|
110675
|
-
|
|
110677
|
+
const parseResults = this._walker.parseResults;
|
|
110678
|
+
if (!parseResults) {
|
|
110676
110679
|
return null;
|
|
110677
110680
|
}
|
|
110678
|
-
this._walker.walk(
|
|
110681
|
+
this._walker.walk(parseResults.parserOutput.parseTree);
|
|
110679
110682
|
return this._walker.featureItems.map((item) => ({
|
|
110680
110683
|
label: [vscode_languageserver_protocol_1.InlayHintLabelPart.create(item.value)],
|
|
110681
|
-
position: (0, positionUtils_1.convertOffsetToPosition)(item.position,
|
|
110684
|
+
position: (0, positionUtils_1.convertOffsetToPosition)(item.position, parseResults.tokenizerOutput.lines),
|
|
110682
110685
|
paddingLeft: item.inlayHintType === 'functionReturn',
|
|
110683
110686
|
kind: item.inlayHintType === 'parameter' ? vscode_languageserver_protocol_1.InlayHintKind.Parameter : vscode_languageserver_protocol_1.InlayHintKind.Type,
|
|
110684
110687
|
}));
|
|
@@ -126060,7 +126063,7 @@ class WorkspaceFactory {
|
|
|
126060
126063
|
}
|
|
126061
126064
|
}
|
|
126062
126065
|
_getDefaultWorkspaceKey(pythonPath) {
|
|
126063
|
-
return `${this._defaultWorkspacePath}
|
|
126066
|
+
return `${this._defaultWorkspacePath}${!uri_1.Uri.isEmpty(pythonPath) ? `:${pythonPath}` : ''}`;
|
|
126064
126067
|
}
|
|
126065
126068
|
_getWorkspaceKey(value) {
|
|
126066
126069
|
// Special the root path for the default workspace. It will be created
|