mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-05 16:10:36 +00:00
![]() ## Summary Resolves https://github.com/astral-sh/ty/issues/339 Supports having a blank function body inside `if TYPE_CHECKING` block or in the elif or else of a `if not TYPE_CHECKING` block. ```py if TYPE_CHECKING: def foo() -> int: ... if not TYPE_CHECKING: ... else: def bar() -> int: ... ``` ## Test Plan Update `function/return_type.md` --------- Co-authored-by: Carl Meyer <carl@astral.sh> |
||
---|---|---|
.. | ||
corpus | ||
mdtest | ||
primer | ||
README.md |
Markdown files within the mdtest/
subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs
integration test.
See crates/ty_test/README.md
for documentation of this test format.