Skip to content

(🐞) Callables are joined into builtins.function #17017

Closed as not planned
Closed as not planned
@KotlinIsland

Description

@KotlinIsland
from typing import Callable

class C:
    def __init__(self, i: int=1): ...

c1: Callable[[], object] = C
c2: Callable[[int], object] = C
reveal_type(c1 if bool() else c2)  # Revealed type is "builtins.function"

It should be joined into... something else, either object or Callable[..., object] or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-join-v-unionUsing join vs. using unions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions