- Removed trailing whitespace and ensured files end with a single newline in cleanup_unused_files.py. - Added fix_trailing_whitespace.py to batch remove trailing whitespace from Python files. - Updated install_dependencies.py to improve dependency installation prompts. - Cleaned up pick_coords.py by removing unnecessary whitespace and improving code readability. - Enhanced region_selector.py by disabling specific pylint checks for better compatibility with third-party libraries. - Improved WPS流程图生成工具.py by cleaning up whitespace and enhancing readability. - Updated __init__.py in typings to remove unnecessary lines. - Modified app.js to adjust default configuration values and clean up unused code.
43 lines
1.0 KiB
Python
43 lines
1.0 KiB
Python
"""高价值房间显示组件
|
|
|
|
包含高价值房间显示和刷新功能的GUI组件。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any, Callable, Tuple
|
|
from tkinter.scrolledtext import ScrolledText
|
|
|
|
try:
|
|
from ttkbootstrap.scrolled import ScrolledText as TBSrolledText
|
|
ScrolledText = TBSrolledText
|
|
except ImportError:
|
|
from tkinter.scrolledtext import ScrolledText
|
|
|
|
|
|
def create_high_value_rooms_display(
|
|
parent: Any
|
|
):
|
|
"""创建高价值房间显示组件。
|
|
|
|
参数:
|
|
parent: 父容器
|
|
|
|
返回:
|
|
(high_value_text, refresh_high_value_rooms_func)
|
|
"""
|
|
high_value_text = ScrolledText(parent)
|
|
high_value_text.pack(fill="both", expand=True, padx=10, pady=10)
|
|
|
|
try:
|
|
high_value_text.configure(font=("Consolas", 10))
|
|
except Exception:
|
|
pass
|
|
|
|
def refresh_high_value_rooms() -> None:
|
|
"""刷新高价值房间。"""
|
|
# TODO: 从原文件迁移函数实现
|
|
pass
|
|
|
|
return high_value_text, refresh_high_value_rooms
|