Skip to content

Forwarding references don't work inside aliases #2259

Closed
@jgarvin

Description

@jgarvin

I was trying to define the following alias:

from typing import Callable, Dict, Set, Any, DefaultDict
from pathlib import Path

Recipe = Callable[["Tracker", Dict[str, Any], Path], Set[Path]]

but I get this error:

error: Name 'Tracker' is not defined

But of course the whole point of forwarding references is that it shouldn't have to be defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions