Format code

This commit is contained in:
taizan-hokuto
2020-06-04 23:10:26 +09:00
parent e6dbc8772e
commit 2474207691
50 changed files with 635 additions and 622 deletions

View File

@@ -2,12 +2,13 @@ from typing import Optional, Dict, Union, List
from .singleton import Singleton
'''
This modules refer to
This modules refer to
Petter Kraabøl's Twitch-Chat-Downloader
https://github.com/PetterKraabol/Twitch-Chat-Downloader
(MIT License)
'''
class Arguments(metaclass=Singleton):
"""
Arguments singleton
@@ -18,11 +19,11 @@ class Arguments(metaclass=Singleton):
OUTPUT: str = 'output'
VIDEO: str = 'video'
def __init__(self,
arguments: Optional[Dict[str, Union[str, bool, int]]] = None):
def __init__(self,
arguments: Optional[Dict[str, Union[str, bool, int]]] = None):
"""
Initialize arguments
:param arguments: Arguments from cli
:param arguments: Arguments from cli
(Optional to call singleton instance without parameters)
"""
@@ -35,5 +36,5 @@ class Arguments(metaclass=Singleton):
self.video_ids: List[int] = []
# Videos
if arguments[Arguments.Name.VIDEO]:
self.video_ids = [video_id
for video_id in arguments[Arguments.Name.VIDEO].split(',')]
self.video_ids = [video_id
for video_id in arguments[Arguments.Name.VIDEO].split(',')]