Skip to content

Support bare Callable types #670

@ghost

Description

from typing import Iterable, TypeVar, Callable, Iterator, Generic

T = TypeVar("T")

def gen(f: Callable, *args) -> Callable[[], Iterator[T]]:
    return lambda: f(*args)

Related question: is it currently possible to type argument f: Callable[..., Iterator[T]]?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions