Skip to content

<TypedDict> |= {} fails with unsupported-operator #2043

@zanieb

Description

@zanieb

https://play.ty.dev/3c2f6220-f3ad-48ed-b960-d80d9d611de2

from typing_extensions import TypedDict

class ModelSettings(TypedDict):
    pass

base = ModelSettings()
overrides = ModelSettings()
base |= overrides # ok
base |= {} # error

Briefly discussed in the dev channel

Metadata

Metadata

Assignees

Labels

bidirectional inferenceInference of types that takes into account the context of a declared type or expected typebugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions