Skip to content

Commit

Permalink
Fix 5 Maintainability issues in Tkinter_GUI\gui.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MP3Martin authored Dec 27, 2024
1 parent baff4aa commit 947f974
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tkinter_GUI/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
try:
import real_division_core as rdc
except:
except Exception:
#import failed
sys.path.pop()
import real_division_core as rdc
Expand Down Expand Up @@ -254,7 +254,7 @@ def addFirstZero(input):
try:
master.tk.call("source", str(themePath))
master.tk.call("set_theme", "dark")
except:
except Exception:
print("Could not load the theme :/")
master.after(500, lambda: messagebox.showerror("Error", "Could not load the theme :(\nYou can still use this program."))

Expand All @@ -281,7 +281,7 @@ def is_num(text):
try:
num = int(text)
return True
except:
except Exception:
return False

def is_num_second(test_str):
Expand Down Expand Up @@ -558,7 +558,7 @@ def select_all(event):
def copy_selected(event):
try:
selected_text = event.widget.get(tk.SEL_FIRST, tk.SEL_LAST)
except:
except Exception:
selected_text = "None"
selected_text = str(selected_text)
widget = str(event.widget).replace(".!frame.!","")
Expand Down Expand Up @@ -597,7 +597,7 @@ def deselect_selected(event):
def custom_paste(event):
try:
event.widget.delete("sel.first", "sel.last")
except:
except Exception:
pass
event.widget.insert("insert", event.widget.clipboard_get())
return "break"
Expand Down

0 comments on commit 947f974

Please sign in to comment.