Skip to content

Commit aba3a5f

Browse files
author
marci
committed
style: format code with black formatter
- Fix code formatting issues in bash_script_maker.py - Remove trailing whitespace and improve line breaks - Ensure compliance with black formatting standards for CI/CD pipeline
1 parent 3fa851c commit aba3a5f

1 file changed

Lines changed: 23 additions & 14 deletions

File tree

bash_script_maker.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def __init__(self, root):
236236
self.root = root
237237
self.root.title("Bash-Script-Maker")
238238
self.root.geometry("1200x800")
239-
239+
240240
# Icon setzen
241241
self.set_window_icon()
242242

@@ -265,39 +265,44 @@ def set_window_icon(self):
265265
try:
266266
# Pfad zum Icon ermitteln
267267
script_dir = os.path.dirname(os.path.abspath(__file__))
268-
268+
269269
# Icon-Größen die wir haben
270270
icon_sizes = [16, 32, 48, 64, 128]
271271
icon_files = []
272-
272+
273273
# Verfügbare Icon-Dateien sammeln
274274
for size in icon_sizes:
275-
icon_path = os.path.join(script_dir, "assets", f"bash-script-maker-{size}.png")
275+
icon_path = os.path.join(
276+
script_dir, "assets", f"bash-script-maker-{size}.png"
277+
)
276278
if os.path.exists(icon_path):
277279
icon_files.append(icon_path)
278-
280+
279281
# Fallback auf 16px Icon
280282
if not icon_files:
281-
fallback_path = os.path.join(script_dir, "assets", "bash-script-maker-16.png")
283+
fallback_path = os.path.join(
284+
script_dir, "assets", "bash-script-maker-16.png"
285+
)
282286
if os.path.exists(fallback_path):
283287
icon_files.append(fallback_path)
284-
288+
285289
if icon_files:
286290
# PNG-Icons verwenden
287291
try:
288292
from PIL import Image, ImageTk
293+
289294
# Alle verfügbaren Icon-Größen laden
290295
icons = []
291-
296+
292297
for icon_path in icon_files:
293298
img = Image.open(icon_path)
294299
photo = ImageTk.PhotoImage(img)
295300
icons.append(photo)
296-
301+
297302
# Haupticon setzen (alle Größen)
298303
self.root.iconphoto(True, *icons)
299304
print(f"Icons gesetzt: {len(icons)} Größen")
300-
305+
301306
except ImportError:
302307
# Fallback ohne PIL - verwende größtes verfügbares Icon
303308
try:
@@ -308,15 +313,19 @@ def set_window_icon(self):
308313
print(f"Icon gesetzt (ohne PIL): {best_icon}")
309314
except tk.TclError as e:
310315
print(f"Fehler beim Laden des PNG-Icons: {e}")
311-
316+
312317
else:
313318
# Kein PNG gefunden, prüfe SVG
314-
svg_icon_path = os.path.join(script_dir, "assets", "bash-script-maker.svg")
319+
svg_icon_path = os.path.join(
320+
script_dir, "assets", "bash-script-maker.svg"
321+
)
315322
if os.path.exists(svg_icon_path):
316-
print(f"SVG-Icon gefunden, aber PNG wird für Tkinter bevorzugt: {svg_icon_path}")
323+
print(
324+
f"SVG-Icon gefunden, aber PNG wird für Tkinter bevorzugt: {svg_icon_path}"
325+
)
317326
else:
318327
print("Keine Icon-Datei gefunden in assets/")
319-
328+
320329
except Exception as e:
321330
print(f"Fehler beim Setzen des Icons: {e}")
322331

0 commit comments

Comments
 (0)