Skip to content

Regression: ParamSpecs are converted to '...' when used in returned Callable #5283

@GugelRobin

Description

@GugelRobin

Describe the bug
See code.

Pyright >1.1.309 starts having the bug

Pylance has the problem as well.

Code or Screenshots

from typing import TypeVar, ParamSpec

T = TypeVar("T")
P = ParamSpec("P")

def foo() -> Callable[[Callable[P, T]], Callable[P, T]]:
    ...

def bar(x: int) -> str:
    ...

reveal_type(foo()(bar)) 
# pyright >  1.1.310 outputs: Type of "foo()(bar)" is "(...) -> str"
# pyright <= 1.1.309 outputs: Type of "foo()(bar)" is "(x: int) -> str"

Metadata

Metadata

Assignees

No one assigned

    Labels

    addressed in next versionIssue is fixed and will appear in next published versionbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions