astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
30.21k stars 986 forks source link

Docs issue: `blanket-type-ignore` rules page should link to a reference of possible codes #10821

Open aaronsteers opened 4 months ago

aaronsteers commented 4 months ago

On the docs page, https://docs.astral.sh/ruff/rules/blanket-type-ignore/, it would be extremely helpful to link to a reference of possible ignore-type codes. Otherwise, the rule is not actionable as-is.

I would be happy to contribute back to the docs, if anyone else knows of a reference page for those mypy-specific type codes.

bendoerry commented 4 months ago

I think for this some sort of detection/configuration of which type checker is being used would be useful, since most type checkers have their own error codes.

I don't really want to be suggesting mypy ignore codes when we're using pyright and vice versa

Avasam commented 3 months ago

@bendoerry FWIW pyright ignores whatever is in between [] brackets completely with type: ignore and will always blanket ignore. You need to use pyright: ignore[] to ignore specific errors.