mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-16 11:20:22 +03:00
Updated comments doc to talk about reportUnnecessaryTypeIgnoreComment.
This commit is contained in:
parent
3a63481f5f
commit
2aeac06f5e
@ -43,3 +43,5 @@ PEP 484 defines a special comment `# type: ignore` that can be used at the end o
|
||||
Pyright also supports a `# pyright: ignore` comment at the end of a line to suppress all Pyright diagnostics on that line. This can be useful if you use multiple type checkers on your source base and want to limit suppression of diagnostics to Pyright only.
|
||||
|
||||
The `# pyright: ignore` comment accepts an optional list of comma-delimited diagnostic rule names surrounded by square brackets. If such a list is present, only diagnostics within those diagnostic rule categories are suppressed on that line. For example, `# pyright: ignore [reportPrivateUsage, reportGeneralTypeIssues]` would suppress diagnostics related to those two categories but no others.
|
||||
|
||||
If the `reportUnnecessaryTypeIgnoreComment` configuration option is enabled, any unnecessary `# type: ignore` and `# pyright: ignore` comments will be reported so they can be removed.
|
||||
|
Loading…
Reference in New Issue
Block a user