mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
Fix tuple typing to work on py 3.8
This commit is contained in:
parent
d777f0e98a
commit
6ed98fa4ef
@ -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],
|
||||
|
@ -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"] = [
|
||||
|
@ -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]:
|
||||
|
Loading…
Reference in New Issue
Block a user