Skip to content

Commit

Permalink
fix transient display id type
Browse files Browse the repository at this point in the history
  • Loading branch information
Kafonek committed Nov 6, 2023
1 parent 946056a commit 9b75e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel_sidecar/models/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class Stream(MessageBase):
# and they'll be rendered with the same value, disp1 updated to content 'bar'.
# https://jupyter-client.readthedocs.io/en/stable/messaging.html#display-data
class DisplayDataTransient(BaseModel):
display_id: Optional[str] = None
display_id: Optional[Union[str, int]] = None
model_config = ConfigDict(extra="allow")


Expand All @@ -267,7 +267,7 @@ class DisplayDataContent(BaseModel):
model_config = ConfigDict(fields={"transient": {"exclude": True}})

@property
def display_id(self) -> Optional[str]:
def display_id(self) -> Optional[Union[str, int]]:
if self.transient:
return self.transient.display_id

Expand Down

0 comments on commit 9b75e10

Please sign in to comment.