Skip to content

Special form Any should not be compatible with type[T] #7082

@erictraut

Description

@erictraut

The following does not produce an error but it should:

from typing import Any

def func[T](x: type[T]) -> None:
    ...

func(Any) # Should produce error

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