Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/pyright-internal/src/analyzer/sourceFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { SourceMapper } from './sourceMapper';
import { SymbolTable } from './symbol';
import { TestWalker } from './testWalker';
import { TypeEvaluator } from './typeEvaluatorTypes';
import { sortDiagnosticsAndMatchBaseline } from '../baseline';
import { BaselineHandler } from '../baseline';

// Limit the number of import cycles tracked per source file.
const _maxImportCyclesPerFile = 4;
Expand Down Expand Up @@ -1247,7 +1247,10 @@ export class SourceFile {
// Now add in the "unnecessary type ignore" diagnostics.
diagList = diagList.concat(unnecessaryTypeIgnoreDiags);

diagList = sortDiagnosticsAndMatchBaseline(this.fileSystem, configOptions.projectRoot, this._uri, diagList);
diagList = new BaselineHandler(this.fileSystem, configOptions.projectRoot).sortDiagnosticsAndMatchBaseline(
this._uri,
diagList
);

// If we're not returning any diagnostics, filter out all of
// the errors and warnings, leaving only the unreachable code
Expand Down
Loading
Loading