Skip to content

Commit 38b890f

Browse files
author
Jonny Johannes
committed
pick_pet and onward has guranteed image_url and link. but objs on deserial cant be req
1 parent a255df4 commit 38b890f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

abstractions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class AdoptablePet:
1616
species: str # "dog" or "cat"
1717
breed: str
1818
location: str
19-
adoption_url: str
20-
image_url: str
2119
description: str = ""
20+
adoption_url: str | None = None
21+
image_url: str | None = None
2222
age_string: str | None = None
2323
sex: str | None = None
2424
size_group: str | None = None
@@ -50,8 +50,8 @@ class Post:
5050
"""Represents a social media post about an adoptable pet."""
5151

5252
text: str
53-
image_url: str
54-
link: str
53+
image_url: str | None = None
54+
link: str | None = None
5555
alt_text: str | None = None # For image accessibility
5656
tags: list[str] = field(default_factory=list)
5757

0 commit comments

Comments
 (0)