Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Union[A,B] type hint yields [user class A, user class B] instead of [instance A, instance B] #459

Copy link
Copy link
@lostmsu

Description

@lostmsu
Issue body actions

Subj.

from typing import Union
class A:
  pass
class B:
  pass
def a() -> Union[A,B]: ...
def b() -> A: ...

Analysis of a's return type gives back a set of user class A and user class B, whereas it should be instance A and instance B.
For comparison, analysis of b's return type gives back a set of instance A.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.