Skip to content

Commit e563d55

Browse files
fix: update type hints for Python 3.9 compatibility
Co-Authored-By: [email protected] <[email protected]>
1 parent 4c36135 commit e563d55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/selfie-lib/selfie_lib/Snapshot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def plus_or_replace(
6767
),
6868
)
6969

70-
def _subject_or_facet_maybe_internal(self, key: str) -> SnapshotValue | None:
70+
def _subject_or_facet_maybe_internal(self, key: str) -> Union[SnapshotValue, None]:
7171
return self._subject if key == "" else self._facet_data.get(key)
7272

7373
def subject_or_facet_maybe(self, key: str) -> Union[bytes, str, None]:
@@ -109,9 +109,9 @@ def items(self) -> Iterator[tuple[str, SnapshotValue]]:
109109
yield from self._facet_data.items()
110110

111111
def __repr__(self) -> str:
112-
pieces = [f"Snapshot.of({self._subject.value_string()!r})"]
113-
pieces.extend(
112+
parts = [f"Snapshot.of({self._subject.value_string()!r})"]
113+
parts.extend(
114114
f"\n .plus_facet({e[0]!r}, {e[1].value_string()!r})"
115115
for e in self._facet_data.items()
116116
)
117-
return "".join(pieces)
117+
return "".join(parts)

0 commit comments

Comments
 (0)