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

@@ -35,12 +35,14 @@ class ProductionIdInput(ttk.Frame):
justify="center",
colors=("black", "#f0f0f0"),
bg="#f0f0f0",
width=3
width=3,
)
self.line_numbers.pack(fill="both", expand=True)
# 创建滚动条
self.scrollbar = ttk.Scrollbar(self, orient=tk.VERTICAL, command=self.text_widget.yview)
self.scrollbar = ttk.Scrollbar(
self, orient=tk.VERTICAL, command=self.text_widget.yview
)
self.text_widget.configure(yscrollcommand=self._on_scroll)
# 布局:行号 | 文本框 | 滚动条
@@ -74,7 +76,10 @@ class ProductionIdInput(ttk.Frame):
def _on_focus_in(self, event):
"""获得焦点时隐藏占位符"""
if not self._updating_placeholder and self.text_widget.get("1.0", "end-1c") == self.placeholder:
if (
not self._updating_placeholder
and self.text_widget.get("1.0", "end-1c") == self.placeholder
):
self.text_widget.delete("1.0", tk.END)
# 确保文字颜色为黑色
self.text_widget.configure(foreground="black")