From aec7f0341c83f460656a0ad4e144689ba849d514 Mon Sep 17 00:00:00 2001
From: Andreas Bolin <2535580+andbo467@users.noreply.github.com>
Date: Tue, 12 Jul 2022 23:07:02 +0200
Subject: [PATCH] cleanup

---
 b_asic/scheduler-gui/main_window.py            | 11 ++---------
 b_asic/scheduler-gui/{ => tests}/scheduler.py  |  0
 b_asic/scheduler-gui/{ => tests}/scheduler2.py |  0
 3 files changed, 2 insertions(+), 9 deletions(-)
 rename b_asic/scheduler-gui/{ => tests}/scheduler.py (100%)
 rename b_asic/scheduler-gui/{ => tests}/scheduler2.py (100%)

diff --git a/b_asic/scheduler-gui/main_window.py b/b_asic/scheduler-gui/main_window.py
index 6eed4aad..f5d9a884 100644
--- a/b_asic/scheduler-gui/main_window.py
+++ b/b_asic/scheduler-gui/main_window.py
@@ -69,19 +69,13 @@ if __debug__:
     # Autocompile the .ui form to a python file.
     try:                                        # PyQt5, try autocompile
         from qtpy.uic import compileUiDir
-        # def _map_func(dir: str, file: str) -> tuple[str, str]:
-        #     file_base,_ = os.path.splitext(file)
-        #     return (dir+'/ui/', file_base+'_ui.py')
-        # uic.compileUiDir('.', map=_map_func)
-        
         uic.compileUiDir('.', map=(lambda dir,file: (dir, 'ui_' + file)))
     except:
         try:                                    # PySide2, try manual compile
             import subprocess
             os_ = sys.platform
             if os_.startswith('linux'):
-                cmds = ["mkdir -p ui",
-                        "pyside2-uic -o ui_main_window.py main_window.ui"]
+                cmds = ['pyside2-uic -o ui_main_window.py main_window.ui']
                 for cmd in cmds:
                     subprocess.call(cmd.split())
             else:
@@ -262,11 +256,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
             self.splitter_center.moveSplitter(range[1], 1)
             
     @Slot(bool)
-    def toggle_exit_dialog(self, checked: bool):
+    def toggle_exit_dialog(self, checked: bool) -> None:
         s = QSettings()
         s.setValue("mainwindow/hide_exit_dialog", checked)
 
-
     @Slot(int, int)
     def _splitter_center_moved(self, pos: int, index: int) -> None:
         """Callback method used to check if the right widget (info window) 
diff --git a/b_asic/scheduler-gui/scheduler.py b/b_asic/scheduler-gui/tests/scheduler.py
similarity index 100%
rename from b_asic/scheduler-gui/scheduler.py
rename to b_asic/scheduler-gui/tests/scheduler.py
diff --git a/b_asic/scheduler-gui/scheduler2.py b/b_asic/scheduler-gui/tests/scheduler2.py
similarity index 100%
rename from b_asic/scheduler-gui/scheduler2.py
rename to b_asic/scheduler-gui/tests/scheduler2.py
-- 
GitLab