Add a note regarding ignore-without-code (#9879)

Closes https://github.com/astral-sh/ruff/issues/9863.
This commit is contained in:
Charlie Marsh 2024-02-07 13:20:18 -08:00 committed by GitHub
parent bc023f47a1
commit 533dcfb114
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -31,7 +31,13 @@ use ruff_text_size::TextSize;
/// ```
///
/// ## References
/// - [mypy](https://mypy.readthedocs.io/en/stable/common_issues.html#spurious-errors-and-locally-silencing-the-checker)
/// Mypy supports a [built-in setting](https://mypy.readthedocs.io/en/stable/error_code_list2.html#check-that-type-ignore-include-an-error-code-ignore-without-code)
/// to enforce that all `type: ignore` annotations include an error code, akin
/// to enabling this rule:
/// ```toml
/// [tool.mypy]
/// enable_error_code = ["ignore-without-code"]
/// ```
#[violation]
pub struct BlanketTypeIgnore;