Skip to content

Commit c407703

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 2200647 commit c407703

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

findmy/accessory.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ def __init__( # noqa: PLR0913
100100
self._name = name
101101
self._model = model
102102
self._identifier = identifier
103-
self._alignment_date = (
104-
alignment_date if alignment_date is not None else paired_at
105-
)
103+
self._alignment_date = alignment_date if alignment_date is not None else paired_at
106104
self._alignment_index = alignment_index if alignment_index is not None else 0
107105
if self._alignment_date.tzinfo is None:
108106
self._alignment_date = self._alignment_date.astimezone()
@@ -168,9 +166,7 @@ def keys_at(self, ind: int | datetime) -> set[KeyPair]:
168166
second=0,
169167
microsecond=0,
170168
)
171-
if (
172-
first_rollover < self._alignment_date
173-
): # we rolled backwards, so increment the day
169+
if first_rollover < self._alignment_date: # we rolled backwards, so increment the day
174170
first_rollover += timedelta(days=1)
175171
secondary_offset = (
176172
int(
@@ -194,7 +190,9 @@ def keys_at(self, ind: int | datetime) -> set[KeyPair]:
194190

195191
@classmethod
196192
def from_plist(
197-
cls, plist: IO[bytes], key_alignment_plist: IO[bytes] | None = None
193+
cls,
194+
plist: IO[bytes],
195+
key_alignment_plist: IO[bytes] | None = None,
198196
) -> FindMyAccessory:
199197
"""Create a FindMyAccessory from a .plist file dumped from the FindMy app."""
200198
device_data = plistlib.load(plist)

0 commit comments

Comments
 (0)