diff --git a/main.py b/main.py index c2dae3e..3b22dd2 100755 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ import sys from os import name from pathlib import Path from subprocess import Popen -from typing import NoReturn, Dict +from typing import Dict, NoReturn from prawcore import ResponseException @@ -45,6 +45,7 @@ checkversion(__VERSION__) reddit_id: str reddit_object: Dict[str, str | list] + def main(POST_ID=None) -> None: global reddit_id, reddit_object reddit_object = get_subreddit_threads(POST_ID) diff --git a/utils/console.py b/utils/console.py index e940100..a9abf4b 100644 --- a/utils/console.py +++ b/utils/console.py @@ -102,7 +102,7 @@ def handle_input( user_input = input("").strip() if check_type is not False: try: - isinstance(eval(user_input), check_type) # fixme: remove eval + isinstance(eval(user_input), check_type) # fixme: remove eval return check_type(user_input) except: console.print( diff --git a/utils/imagenarator.py b/utils/imagenarator.py index 2337ddd..ad75331 100644 --- a/utils/imagenarator.py +++ b/utils/imagenarator.py @@ -64,9 +64,9 @@ def imagemaker(theme, reddit_obj: dict, txtclr, padding=5, transparent=False) -> font = ImageFont.truetype(os.path.join("fonts", "Roboto-Bold.ttf"), 100) else: font = ImageFont.truetype(os.path.join("fonts", "Roboto-Regular.ttf"), 100) - + size = (1920, 1080) - + for idx, text in track(enumerate(texts), "Rendering Image"): image = Image.new("RGBA", size, theme) text = process_text(text, False) diff --git a/utils/settings.py b/utils/settings.py index f6ff75d..6b8242b 100755 --- a/utils/settings.py +++ b/utils/settings.py @@ -78,7 +78,7 @@ def check(value, checks, name): + str(name) + "[#F7768E bold]=", extra_info=get_check_value("explanation", ""), - check_type=eval(get_check_value("type", "False")), # fixme remove eval + check_type=eval(get_check_value("type", "False")), # fixme remove eval default=get_check_value("default", NotImplemented), match=get_check_value("regex", ""), err_message=get_check_value("input_error", "Incorrect input"),