ruff/crates/ty_python_semantic/resources/mdtest/import/stubs.md

290 B

Stubs

Import from stub declaration

from b import x

y = x
reveal_type(y)  # revealed: int

b.pyi:

x: int

Import from non-stub with declaration and definition

from b import x

y = x
reveal_type(y)  # revealed: int

b.py:

x: int = 1