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

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