Fix ruff lint violations

This commit is contained in:
Marcel Peterkau
2026-06-27 10:46:54 +02:00
parent 9944652dfb
commit 3876f8c5ab
12 changed files with 217 additions and 49 deletions
+19 -4
View File
@@ -5,7 +5,7 @@ from collections.abc import Callable
from datetime import datetime
from tkinter import messagebox, ttk
from ccma.domain.models import ASSET_STATUS_LABELS, Asset, Event
from ccma.domain.models import ASSET_STATUS_LABELS, Event
from ccma.storage.repository import MemberRepository, RepositoryError
from ccma.ui.dialogs import AssetClaimDialog, IntegrityWarningDialog
from ccma.ui.messages import MessageAction, MessageBannerList, TabMessage
@@ -196,8 +196,16 @@ class AssetTab(ttk.Frame):
ttk.Button(finance_actions, text="Verlustforderung", command=self._create_loss_claim).pack(
side="left", padx=(0, 8)
)
ttk.Button(finance_actions, text="Reparaturforderung", command=self._create_repair_claim).pack(side="left")
self.asset_claims = ttk.Treeview(finance_tab, columns=("title", "due", "amount", "member"), show="headings")
ttk.Button(
finance_actions,
text="Reparaturforderung",
command=self._create_repair_claim,
).pack(side="left")
self.asset_claims = ttk.Treeview(
finance_tab,
columns=("title", "due", "amount", "member"),
show="headings",
)
for key, title, width in (
("title", "Forderung", 240),
("due", "Fällig", 110),
@@ -429,7 +437,14 @@ class AssetTab(ttk.Frame):
claim_type="asset_repair",
)
def _open_claim_dialog(self, *, preset_title: str, preset_amount: str, preset_description: str, claim_type: str) -> None:
def _open_claim_dialog(
self,
*,
preset_title: str,
preset_amount: str,
preset_description: str,
claim_type: str,
) -> None:
member_id = self.asset.current_holder_member_id
if not member_id:
messagebox.showerror(