style: format all Python files with Black

Apply Black formatter to the entire codebase for consistent code style.

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-02-26 22:44:03 +08:00
parent 1b16842a2c
commit 3b7c00377f
46 changed files with 1488 additions and 974 deletions

View File

@@ -1,6 +1,7 @@
"""
Login Dialog - Modal dialog for user authentication
"""
import socket
import tkinter as tk
from tkinter import ttk, messagebox
@@ -62,7 +63,7 @@ class LoginDialog:
self._create_widgets()
# Bind Enter key to login button
self.dialog.bind('<Return>', lambda e: self._on_login())
self.dialog.bind("<Return>", lambda e: self._on_login())
# Focus on username entry
self.username_entry.focus_set()
@@ -74,19 +75,15 @@ class LoginDialog:
main_frame.pack(fill=tk.BOTH, expand=True)
# Title
title_label = ttk.Label(
main_frame,
text="请登录",
font=('', 16, 'bold')
)
title_label = ttk.Label(main_frame, text="请登录", font=("", 16, "bold"))
title_label.pack(pady=(0, 10))
# Computer name display
computer_name_label = ttk.Label(
main_frame,
text=f"当前计算机: {socket.gethostname()}",
font=('', 9),
foreground='gray'
font=("", 9),
foreground="gray",
)
computer_name_label.pack(pady=(0, 15))
@@ -112,28 +109,19 @@ class LoginDialog:
# Login button
login_btn = ttk.Button(
button_frame,
text="登录",
command=self._on_login,
width=10
button_frame, text="登录", command=self._on_login, width=10
)
login_btn.pack(side=tk.LEFT, padx=5)
# Cancel button
cancel_btn = ttk.Button(
button_frame,
text="取消",
command=self._on_cancel,
width=10
button_frame, text="取消", command=self._on_cancel, width=10
)
cancel_btn.pack(side=tk.LEFT, padx=5)
# Version info
version_label = ttk.Label(
main_frame,
text="v1.0",
font=('', 8),
foreground='gray'
main_frame, text="v1.0", font=("", 8), foreground="gray"
)
version_label.pack(side=tk.BOTTOM, pady=10)