MCPcopy
hub / github.com/microsoft/pyright / _buildFileInfo

Method _buildFileInfo

server/src/analyzer/sourceFile.ts:435–453  ·  view source on GitHub ↗
(configOptions: ConfigOptions, importMap?: ImportMap, builtinsScope?: Scope)

Source from the content-addressed store, hash-verified

433 }
434
435 private _buildFileInfo(configOptions: ConfigOptions, importMap?: ImportMap, builtinsScope?: Scope) {
436 assert(this._analysisJob.parseResults !== undefined);
437 let analysisDiagnostics = new TextRangeDiagnosticSink(this._analysisJob.parseResults!.lines);
438
439 let fileInfo: AnalyzerFileInfo = {
440 importMap: importMap || {},
441 builtinsScope,
442 diagnosticSink: analysisDiagnostics,
443 executionEnvironment: configOptions.findExecEnvironment(this._filePath),
444 configOptions,
445 lines: this._analysisJob.parseResults!.lines,
446 filePath: this._filePath,
447 isStubFile: this._isStubFile,
448 isTypingStubFile: this._isTypingStubFile,
449 isCollectionsStubFile: this._isCollectionsStubFile,
450 console: this._console
451 };
452 return fileInfo;
453 }
454
455 private _cleanParseTreeIfRequired() {
456 if (this._analysisJob && this._analysisJob.parseResults) {

Callers 2

doSemanticAnalysisMethod · 0.95
doTypeAnalysisMethod · 0.95

Calls 1

findExecEnvironmentMethod · 0.80

Tested by

no test coverage detected