Skip to content

Commit

Permalink
use get instead of dict key
Browse files Browse the repository at this point in the history
  • Loading branch information
rouk1 committed Dec 19, 2024
1 parent 659a86b commit 96c751a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion skore/src/skore/item/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def __repr__(self) -> str:
return f"{self.__class__.__name__}(...)"

def _repr_mimebundle_(self, include=None, exclude=None):
del include, exclude
return {"text/html": self._repr_html_()}

def _repr_html_(self):
Expand Down
8 changes: 4 additions & 4 deletions skore/src/skore/ui/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def __item_as_serializable(name: str, item: Item) -> SerializableItem:
d = item.as_serializable_dict()
return SerializableItem(
name=name,
media_type=d["media_type"],
value=d["value"],
updated_at=d["updated_at"],
created_at=d["created_at"],
media_type=d.get("media_type"),
value=d.get("value"),
updated_at=d.get("updated_at"),
created_at=d.get("created_at"),
)


Expand Down

0 comments on commit 96c751a

Please sign in to comment.