From 90f271a464d0f0ec76437957881c59c070c95308 Mon Sep 17 00:00:00 2001 From: justaCasualCoder <120528794+justaCasualCoder@users.noreply.github.com> Date: Sat, 23 Dec 2023 09:07:47 -0500 Subject: [PATCH] Format `guiunstable.py` and rename requirements.txt --- guiunstable.py | 12 +++++++----- requiremnts.txt => requirements.txt | 0 2 files changed, 7 insertions(+), 5 deletions(-) rename requiremnts.txt => requirements.txt (100%) diff --git a/guiunstable.py b/guiunstable.py index f4ea789..06741a1 100644 --- a/guiunstable.py +++ b/guiunstable.py @@ -153,7 +153,7 @@ def start_process(self, partition, image): self.p.stateChanged.connect(self.handle_state) self.p.finished.connect(self.process_finished) # Clean up once complete. heimdallbin = os.path.abspath(os.path.join(cwd, "heimdall/heimdall_linux")) - if os.name == 'nt': + if os.name == "nt": print("Running on Windows!") print("Running heimdall.exe") heimdallbin = "./heimdall/heimdall.exe" @@ -247,7 +247,9 @@ def fetch_devices(self): code = element["href"].split("/")[-1].split(".")[0] # Extract all content within parentheses - parentheses_content = [content.strip() for content in device_name.split("(")[1:]] + parentheses_content = [ + content.strip() for content in device_name.split("(")[1:] + ] # Use the second set of parentheses if it exists; otherwise, use the first set of parentheses if len(parentheses_content) >= 2: @@ -261,8 +263,9 @@ def fetch_devices(self): # Add the device name and customized code to the dictionary devices[device_name] = code self.devices = devices - self.entry.addItems(list(self.devices.keys())) + self.entry.addItems(list(self.devices.keys())) return devices + def download_flash(self): # Huge thanks to the orginal creator - JBBgameich # https://github.com/JBBgameich/halium-install @@ -302,7 +305,7 @@ def __init__(self): self.get_device_button = QPushButton("Fetch Devices") self.get_device_button.clicked.connect(self.fetch_devices) self.entry = QComboBox() - # self.entry.addItems(list(self.devices.keys())) + # self.entry.addItems(list(self.devices.keys())) self.entry.currentIndexChanged.connect(self.device_selected) info1 = QLabel("Device") button = QPushButton("Download / Flash") @@ -327,7 +330,6 @@ def device_selected(self, index): else: print(f"Code not found for {selected_device}") self.current_code = selected_device_code - if __name__ == "__main__": diff --git a/requiremnts.txt b/requirements.txt similarity index 100% rename from requiremnts.txt rename to requirements.txt