Add type annotations to ytrss.

This commit is contained in:
voussoir 2022-10-29 22:21:11 -07:00
parent e08668b28f
commit 1c4d13cd2f
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -24,7 +24,7 @@ def _get_user_videos(channel_id):
log.loud('RSS got %s.', video_ids) log.loud('RSS got %s.', video_ids)
return video_ids return video_ids
def get_user_videos(channel_id): def get_user_videos(channel_id) -> list[str]:
''' '''
Return the list of video ids from the channel. Return the list of video ids from the channel.
Expect a maximum of 15 results. Expect a maximum of 15 results.
@ -35,7 +35,7 @@ def get_user_videos(channel_id):
log.warning(traceback.format_exc()) log.warning(traceback.format_exc())
raise exceptions.RSSAssistFailed(f'Failed to fetch RSS videos ({exc}).') from exc raise exceptions.RSSAssistFailed(f'Failed to fetch RSS videos ({exc}).') from exc
def get_user_videos_since(channel_id, video_id): def get_user_videos_since(channel_id, video_id) -> list[str]:
''' '''
Return the list of video ids that are more recently released than the Return the list of video ids that are more recently released than the
reference id. reference id.