Skip to content

Commit

Permalink
fix some typos in comments and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Dec 8, 2024
1 parent 7e12080 commit 8d459fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
5 changes: 2 additions & 3 deletions packages/pyright-internal/src/baseline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 8d459fc

Please sign in to comment.