Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest ruff
pip install pytest ruff "Pillow>=12.3.0"

- name: Run Ruff Lint Check
run: ruff check .
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Format basiert auf [Keep a Changelog](https://keepachangelog.com/de/1.1.0/).

## [Unreleased]

### CI-Lint und Python-3.10-Vertragstests (2026-10-15)
- Die Fehlerbehandlung beim Laden von Übersetzungen und beim Speichern von Berichten auf erwartete Datei-, Daten- und Tk-Fehler begrenzt. Die bestehenden Ruff-Regeln bleiben aktiviert.
- Importreihenfolge und einen überflüssigen Encoding-Header in zwei Testmodulen korrigiert. Der TOML-Vertragstest verwendet unter Python 3.10 den bereits von pytest benötigten `tomli`-Parser.
- Pillow als reine Entwicklungs-/Testabhängigkeit für die Bildprüfungen deklariert und im CI-Installationsschritt ergänzt; die Anwendung selbst benötigt weiterhin nur die Standardbibliothek.

### CLI Windows cp1252-Resilienz & Tier-2 Translations-Paritäts-Tooling (2026-10-09)
- **Windows cp1252 CLI Encoding-Resilienz (`MethodenAnalyser3.py`)**:
- `generate_report`: Unicode-Pfeil `\u2192` (`→`) bei der Ausgabe ähnlicher Namens-Matches (`name_matches`) durch ASCII-Pfeil `->` ersetzt. Behebt `BS-02-BACKLOG` und schließt `UnicodeEncodeError: 'charmap' codec can't encode character '\u2192'` auf Windows-Konsolen mit Standard-Codepage cp1252 zuverlässig aus.
Expand Down
2 changes: 1 addition & 1 deletion MethodenAnalyser3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,7 @@ def save_report_as(output_widget: scrolledtext.ScrolledText, status_widget: tk.L
if status_widget is not None:
status_widget.config(text=f"{_t('status_report_saved')} {os.path.basename(file_path)}")
messagebox.showinfo(_t("dialog_success_title"), f"{_t('status_report_saved')} {file_path}")
except Exception as e:
except (OSError, ValueError, tk.TclError) as e:
if status_widget is not None:
status_widget.config(text=f"[FEHLER] {e}")
messagebox.showerror(_t("dialog_error_title"), str(e))
Expand Down
4 changes: 2 additions & 2 deletions manage_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def check_translations(source_dir="."):
try:
with open(trans_file, "r", encoding="utf-8") as f:
translations = json.load(f)
except Exception as e:
except (OSError, ValueError) as e:
print(f"[!] Fehler beim Laden von {trans_file}: {e}")
return False

Expand Down Expand Up @@ -114,7 +114,7 @@ def show_stats(source_dir="."):
try:
with open(trans_file, "r", encoding="utf-8") as f:
translations = json.load(f)
except Exception as e:
except (OSError, ValueError) as e:
print(f"[!] Fehler beim Laden von {trans_file}: {e}")
return

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Support = "mailto:support@lukasgeiger.com"
dev = [
"pytest>=9.1.1",
"ruff>=0.9.0",
"Pillow>=12.3.0",
]
build = [
"pyinstaller>=6.10.0",
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Tested toolchain range (runtime remains Python standard library only).
pytest>=9.1.1,<10.0
ruff>=0.9.0
Pillow>=12.3.0
pyinstaller>=6.14.2,<7.0
altgraph>=0.17.4
packaging>=24.0
2 changes: 1 addition & 1 deletion tests/test_app_assets.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""Test suite for application icon assets, store logos and PWA manifests."""

import json
from pathlib import Path

from PIL import Image

ROOT = Path(__file__).resolve().parents[1]
Expand Down
6 changes: 5 additions & 1 deletion tests/test_security_license_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@

import ast
import re
import tomllib
from pathlib import Path

try:
import tomllib
except ModuleNotFoundError: # Python 3.10; supplied by pytest's test dependencies.
import tomli as tomllib

ROOT = Path(__file__).resolve().parents[1]


Expand Down
Loading