diff --git a/pupgui2/resources/ctmods/ctmod_protoncachyos.py b/pupgui2/resources/ctmods/ctmod_protoncachyos.py index 45afdbb7..a018429c 100644 --- a/pupgui2/resources/ctmods/ctmod_protoncachyos.py +++ b/pupgui2/resources/ctmods/ctmod_protoncachyos.py @@ -3,12 +3,10 @@ # Copyright (C) 2021 DavidoTek, partially based on AUNaseef's protonup import os -from typing import Dict, Optional, Set +from typing import override -from PySide6.QtCore import QCoreApplication, Signal -from PySide6.QtWidgets import QMessageBox +from PySide6.QtCore import QCoreApplication -from pupgui2.networkutil import download_file from pupgui2.util import ghapi_rlcheck, extract_tar from .ctmod_00protonge import CtInstaller as ProtonGECtInstaller @@ -35,7 +33,8 @@ class CtInstaller(ProtonGECtInstaller): CT_URL = 'https://api.github.com/repos/CachyOS/proton-cachyos/releases' CT_INFO_URL = 'https://github.com/CachyOS/proton-cachyos/releases/tag/' - def __fetch_github_data(self, tag: str, arch: str) -> Optional[Dict]: + @override + def __fetch_github_data(self, tag: str, arch: str) -> dict | None: """ Fetch GitHub release information Return Type: dict @@ -56,7 +55,7 @@ def __fetch_github_data(self, tag: str, arch: str) -> Optional[Dict]: values['size'] = asset['size'] return values - def get_hwcaps(self) -> Set: + def get_hwcaps(self) -> set[str]: hwcaps = {'x86_64'} # flags according to https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex flags_v2 = {'sse4_1', 'sse4_2', 'ssse3'} @@ -75,8 +74,8 @@ def get_hwcaps(self) -> Set: hwcaps.add('x86_64_v2') return hwcaps - - def fetch_releases(self, count: int = 100, page: int = 1): + @override + def fetch_releases(self, count: int = 100, page: int = 1) -> list: """ List available releases Return Type: str[] @@ -95,6 +94,7 @@ def fetch_releases(self, count: int = 100, page: int = 1): assets.append(name) return assets + @override def get_tool(self, version: str, install_dir: str, temp_dir: str): """ Download and install the compatibility tool @@ -139,6 +139,7 @@ def get_tool(self, version: str, install_dir: str, temp_dir: str): return True + @override def get_info_url(self, version: str) -> str: """ Get link with info about version (eg. GitHub release page)