Rename flatten to flatten_list
MODIFY
plextraktsync/decorators/flatten.py
plextraktsync/decorators/flatten.py
from functools import wraps
-def flatten(method):
+def flatten_list(method):
@wraps(method)
def inner(*args):
return list(method(*args))

MODIFY
plextraktsync/plex_api.py
plextraktsync/plex_api.py
from plexapi.video import Episode, Movie, Show
from trakt.utils import timestamp
-from plextraktsync.decorators.flatten import flatten
+from plextraktsync.decorators.flatten import flatten_list
from plextraktsync.decorators.memoize import memoize
from plextraktsync.decorators.nocache import nocache
from plextraktsync.decorators.rate_limit import rate_limit
@@ -190,7 +190,7 @@ def parts(self) -> List[MediaPart]:
for media in self.item.media:
yield from media.parts
- @flatten
+ @flatten_list
def streams(self, cls):
for part in self.parts:
for stream in part.streams:

Rename flatten to flatten_list