-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
astral-sh/ruff
#22540Labels
bidirectional inferenceInference of types that takes into account the context of a declared type or expected typeInference of types that takes into account the context of a declared type or expected typebugSomething isn't workingSomething isn't working
Milestone
Description
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 |= {} # errorBriefly discussed in the dev channel
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bidirectional inferenceInference of types that takes into account the context of a declared type or expected typeInference of types that takes into account the context of a declared type or expected typebugSomething isn't workingSomething isn't working