mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
300 B
300 B
What it does
Checks for default values that can't be assigned to the parameter's annotated type.
Why is this bad?
This breaks the rules of the type system and weakens a type checker's ability to accurately reason about your code.
Examples
def f(a: int = ""): ... # error