Skip to content

Commit

Permalink
Fixed bug that results in incorrect logging of the pythonVersion stri…
Browse files Browse the repository at this point in the history
…ng. This addresses #8798.
  • Loading branch information
erictraut committed Aug 21, 2024
1 parent 2876bae commit a9bd905
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/pyright-internal/src/common/configOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ export class ConfigOptions {
const importFailureInfo: string[] = [];
this.defaultPythonVersion = host.getPythonVersion(this.pythonPath, importFailureInfo);
if (this.defaultPythonVersion !== undefined) {
console.info(`Assuming Python version ${this.defaultPythonVersion.toString()}`);
console.info(`Assuming Python version ${PythonVersion.toString(this.defaultPythonVersion)}`);
}

for (const log of importFailureInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export async function runPyrightServer(
testName: expect.getState().currentTestName ?? 'NoName',
code,
projectRoots: projectRootsArray.map((p) => (p.includes(':') ? UriEx.parse(p) : UriEx.file(p))),
pythonVersion: pythonVersion.toString(),
pythonVersion: PythonVersion.toString(pythonVersion),
backgroundAnalysis,
logFile: UriEx.file(path.join(__dirname, `log${process.pid}.txt`)),
pid: process.pid.toString(),
Expand Down

0 comments on commit a9bd905

Please sign in to comment.