ruff/crates/ty_python_semantic/resources/mdtest/shadowing/variable_declaration.md
2025-05-03 19:49:15 +02:00

178 B

Shadwing declaration

Shadow after incompatible declarations is OK

def _(flag: bool):
    if flag:
        x: str
    else:
        x: int

    x: bytes = b"foo"