diff --git a/horsygui.py b/horsygui.py index cf4fc49..98357fc 100644 --- a/horsygui.py +++ b/horsygui.py @@ -40,7 +40,7 @@ if __name__ == "__main__": ui.username_box.setText(loginload()) -# Functions +# Connected functions def refresh_gui(): installed_apps() diff --git a/modules/download.py b/modules/download.py index 0eb435b..0b08353 100644 --- a/modules/download.py +++ b/modules/download.py @@ -1,3 +1,6 @@ +# Idea from rich examples +# https://github.com/Textualize/rich/blob/master/examples/downloader.py + import os.path from concurrent.futures import ThreadPoolExecutor import signal diff --git a/modules/http_status.py b/modules/http_status.py index fc6b67e..730b091 100644 --- a/modules/http_status.py +++ b/modules/http_status.py @@ -97,6 +97,9 @@ codes = {'CONTINUE': 100, } -def handle(code): +def handle(code) -> list: + """Prints and the status code in another way and code from args. + If it was number code returns list with message and code and if it was string code + returns list with code and message""" print(codes[code]) return [codes[code], code] diff --git a/modules/manager.py b/modules/manager.py index 26139e4..fda9035 100644 --- a/modules/manager.py +++ b/modules/manager.py @@ -29,7 +29,6 @@ def install(package): os.makedirs('{1}apps\{0}'.format(r['name'], horsy_vars.horsypath)) # Get all download files urls - print(f"Downloading {r['url'].split('/')[-1]}") to_download = [r['url']] if r['download']: print(f"Found dependency") diff --git a/modules/vars.py b/modules/vars.py index 562301c..2e1229e 100644 --- a/modules/vars.py +++ b/modules/vars.py @@ -3,4 +3,4 @@ import os protocol = "https://" server_url = 'horsy.ml' -horsypath = os.popen('echo %HORSYPATH%').read().replace('\n', '') + '/' +horsypath = os.popen('echo %HORSYPATH%').read().replace('\n', '') + '\\'