mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-22 08:15:36 +08:00
426 B
426 B
What it does
Checks for declarations where the inferred type of an existing symbol is not assignable to its post-hoc declared type.
Why is this bad?
Such declarations break the rules of the type system and weaken a type checker's ability to accurately reason about your code.
Examples
a = 1
a: str # error