diff --git a/docs/configuration.md b/docs/configuration.md index 944a9073a..5f3beebba 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -88,7 +88,7 @@ diagnostics can be configured to be reported as any of the following categories: !!! note the `"unreachable"`, `"unused"` and `"deprecated"` diagnostic categories are deprecated in favor of `"hint"`. rules where it makes sense - to be report them as "unnecessary" or "deprecated" [as mentioned in the LSP spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticSeverity) are still reported as such, the configuration to do so has just been simplified. + to report them as "unnecessary" or "deprecated" [as mentioned in the LSP spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticSeverity) are still reported as such, the configuration to do so has just been simplified. the `"hint"` diagnostic category is more flexible as it can be used on rules that don't refer to something that's unused, unreachable or deprecated. [baselined diagnostics](../benefits-over-pyright/baseline.md) are now all reported as a hint, instead of just the ones that supported one of the specific diagnostic tag categories. diff --git a/packages/pyright-internal/src/baseline.ts b/packages/pyright-internal/src/baseline.ts index 75b3ae452..3fdb81218 100644 --- a/packages/pyright-internal/src/baseline.ts +++ b/packages/pyright-internal/src/baseline.ts @@ -102,7 +102,7 @@ export class BaselineHandler { /** * updates the baseline file * - * @param force whether to write the baseline file even if there are new errors or if there is not baseline + * @param force whether to write the baseline file even if there are new errors or if there is no baseline * file yet * @param removeDeletedFiles whether to check whether each file listed in the baseline still exists, and * delete its errors from the baseline file if not. this option mainly exists for performance reasons (but @@ -189,8 +189,7 @@ export class BaselineHandler { } else { // if unchanged - // if the baselined error can be reported as a hint (eg. unreachable/deprecated), keep it and change its diagnostic - // level to that instead + // update the diagnostic category of the baselined diagnostics to hint // TODO: should we only baseline errors/warnings and not notes? for (const diagnostic of change.value) { assert(