Fix tuple typing to work on py 3.8

This commit is contained in:
Ivan Habunek 2024-04-24 08:10:56 +02:00
parent d777f0e98a
commit 6ed98fa4ef
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
3 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ import logging
import platform
import re
import sys
from typing import Optional
from typing import Optional, Tuple
import click
@ -255,7 +255,7 @@ def clips(
default=5,
)
def download(
ids: tuple[str, ...],
ids: Tuple[str, ...],
auth_token: Optional[str],
chapter: Optional[int],
concat: bool,
@ -374,7 +374,7 @@ def videos(
channel_name: str,
all: bool,
compact: bool,
games_tuple: tuple[str, ...],
games_tuple: Tuple[str, ...],
json: bool,
limit: Optional[int],
pager: Optional[int],

View File

@ -72,7 +72,7 @@ def video_info(video: Video, playlists, chapters: List[Chapter]):
print_table(["Placeholder", "Value"], placeholders)
def video_json(video, playlists, chapters):
def video_json(video: Video, playlists: str, chapters: List[Chapter]):
playlists = m3u8.loads(playlists).playlists
video["playlists"] = [

View File

@ -3,7 +3,7 @@ Twitch API access.
"""
import json
from typing import Dict, Generator, List, Literal, Mapping, Optional, TypedDict
from typing import Dict, Generator, List, Literal, Mapping, Optional, Tuple, TypedDict
import click
import httpx
@ -345,7 +345,7 @@ def channel_videos_generator(
sort: VideosSort,
type: VideosType,
game_ids: Optional[List[str]] = None,
) -> tuple[int, Generator[Video, None, None]]:
) -> Tuple[int, Generator[Video, None, None]]:
game_ids = game_ids or []
def _generator(videos: Data, max_videos: int) -> Generator[Video, None, None]: