Skip to content

Commit

Permalink
Add typing to fool IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 18, 2021
1 parent d0381aa commit 8c3fb74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_tv_lookup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/usr/bin/env python3 -m pytest
from typing import Union

from trakt.tv import TVShow

from plex_trakt_sync.plex_api import PlexLibraryItem
from plex_trakt_sync.trakt_api import TraktApi


def make(cls=None, **kwargs):
def make(cls=None, **kwargs) -> Union[TVShow]:
cls = cls if cls is not None else "object"
# https://stackoverflow.com/a/2827726/2314626
return type(cls, (object,), kwargs)
Expand Down

0 comments on commit 8c3fb74

Please sign in to comment.