Skip to content

Commit 06dfc14

Browse files
committed
refactor: Inline dict update
1 parent 5fa819f commit 06dfc14

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pystac/link.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ def to_dict(self) -> Dict[str, Any]:
244244
dict: A serialization of the Link that can be written out as JSON.
245245
"""
246246

247-
d: Dict[str, Any] = {"rel": self.rel}
248-
249-
d["href"] = self.get_href()
247+
d: Dict[str, Any] = {"rel": self.rel, "href": self.get_href()}
250248

251249
if self.media_type is not None:
252250
d["type"] = self.media_type

0 commit comments

Comments
 (0)