Skip to content

no error when assigning a non-callable type to type[Callable] #2964

@KotlinIsland

Description

@KotlinIsland

Summary

from collections.abc import Callable

class A:
    pass

def f() -> type[Callable]:
    return A  # no error


f()()

Version

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions