mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Fix issues with generators, fixes #1624
This commit is contained in:
@@ -292,3 +292,22 @@ def test_in_brackets():
|
||||
x = yield from [1]
|
||||
#? None
|
||||
x
|
||||
|
||||
|
||||
# -----------------
|
||||
# Annotations
|
||||
# -----------------
|
||||
|
||||
from typing import Iterator
|
||||
|
||||
def annotation1() -> float:
|
||||
yield 1
|
||||
|
||||
def annotation2() -> Iterator[float]:
|
||||
yield 1
|
||||
|
||||
|
||||
#?
|
||||
next(annotation1())
|
||||
#? float()
|
||||
next(annotation2())
|
||||
|
||||
Reference in New Issue
Block a user