Skip to content

type[tuple[Any, ...]] should be considered callable #530

Open
@rchen152

Description

@rchen152

Describe the Bug

from typing import Any
def f(x: type[tuple[Any, ...]]):
    return x() # Expected a callable, got type[tuple[Any, ...]]

I'd expect pyrefly to report no error in this code.

Sandbox Link

https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoCCKcAUCQCYCmwUwAFAB4BcsilA2jAK4IA2HROABooAOnEBdCQEomJKAqghK3ECigM60oA

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions