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

Function _addError

server/src/analyzer/semanticAnalyzer.ts:919–924  ·  view source on GitHub ↗
(message: string, textRange: TextRange)

Source from the content-addressed store, hash-verified

917 }
918
919 private _addError(message: string, textRange: TextRange) {
920 // Don't emit error if the scope is guaranteed not to be executed.
921 if (!this._currentScope.isNotExecuted()) {
922 this._fileInfo.diagnosticSink.addErrorWithTextRange(message, textRange);
923 }
924 }
925
926 private _addWarning(message: string, textRange: TextRange) {
927 // Don't emit error if the scope is guaranteed not to be executed.

Callers

nothing calls this directly

Calls 2

isNotExecutedMethod · 0.80
addErrorWithTextRangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…