Skip to content

Inconsistent type inference with type(None) #12658

Closed
@smackesey

Description

@smackesey

Bug Report

TYPE_NONE = type(None)
reveal_type(type(None))  # => `Type[None]`
reveal_type(TYPE_NONE)  # => `builtins.object`

Expected Behavior

The two reveal_type calls above should print the same thing (Type[None])

Your Environment

  • Mypy version used: 0.942
  • Python version used: 3.10.4
  • Operating system and version: macOS 12.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions