Skip to content

Commit 870edcd

Browse files
committed
Use config values in abstractions format_post
1 parent 9e5ea1d commit 870edcd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

abstractions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from dataclasses import dataclass, field
33
from typing import Iterable
44

5+
from config import CITY_NAME, CITY_STATE
6+
57

68
# =============================================================================
79
# Pet Ingestor Interface
@@ -120,7 +122,7 @@ def format_post(self, pet: AdoptablePet) -> Post:
120122
text += f"\n\nAdopt {pet.name}: {pet.adoption_url}"
121123

122124
city = ""
123-
if pet.location != "Boston, MA":
125+
if pet.location != f"{CITY_NAME}, {CITY_STATE}":
124126
city = pet.location.split(",")[0].capitalize()
125127

126128
return Post(

0 commit comments

Comments
 (0)