Skip to content

Commit e46ef7b

Browse files
author
Jon Duckworth
authored
Merge pull request #526 from l0b0/refactor/inline-dict-update
refactor: Inline `dict` update
2 parents 8a33b07 + 06dfc14 commit e46ef7b

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
@@ -250,9 +250,7 @@ def to_dict(self) -> Dict[str, Any]:
250250
dict: A serialization of the Link that can be written out as JSON.
251251
"""
252252

253-
d: Dict[str, Any] = {"rel": self.rel}
254-
255-
d["href"] = self.get_href()
253+
d: Dict[str, Any] = {"rel": self.rel, "href": self.get_href()}
256254

257255
if self.media_type is not None:
258256
d["type"] = self.media_type

0 commit comments

Comments
 (0)