CatalogDict: institution and URL can be None

This commit is contained in:
Edward Betts 2023-11-09 07:37:28 +01:00
parent f33f4b6394
commit ae0b2e5a51
2 changed files with 2 additions and 3 deletions

View file

@ -28,8 +28,8 @@ class Entity(TypedDict, total=False):
class CatalogDict(TypedDict, total=False):
"""Catalog record from institution web site."""
institution: str
url: str
institution: str | None
url: str | None
ids: set[str]
detail: list[dict[str, str]]
description: str

View file

@ -399,7 +399,6 @@ def get_catalog_from_artwork(entity: Entity) -> CatalogDict:
catalog_detail.append(detail)
url = wikibase.first_datavalue(entity, "P973")
assert isinstance(url, str)
catalog: CatalogDict = {
"url": url,
"detail": catalog_detail,