Skip to content

Commit 70cb448

Browse files
committed
Keep the analyser marker within the line limit
1 parent 82fb01f commit 70cb448

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎architecture_explore.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ iOS(WebDriverAgent)。核心能力是滑鼠/鍵盤控制、影像辨識、
2020
| 指標 | 數值 |
2121
| --- | ---: |
2222
| Python 模組總數(含周邊子專案) | 1,068 |
23-
| 程式碼總行數 | 158,286 |
23+
| 程式碼總行數 | 158,287 |
2424
| `je_auto_control/utils/` 子套件數 | 310 |
2525
| `AC_*` 動作指令數(`known_commands()` 實測) | 778 |
2626
| 套件門面 `__all__` 公開名稱數 | 1,244 |
@@ -883,7 +883,7 @@ GUI 是**選用 extra**(`pip install je_auto_control[gui]`,PySide6 + qt-mate
883883
| `gui/__init__.py` | 25 | `start_autocontrol_gui()`:**唯一**會延遲匯入 PySide6 的地方,維持頂層套件 Qt-free。 |
884884
| `main_window.py` | 379 | `QMainWindow`:選單列(File/Actions/View/…)、左側導覽面板 dock(`Ctrl+K` 搜尋、`Ctrl+B` 收合)、即時語言切換、字級預設、深色/淺色主題(`theme.py` 的 token,不再用 qt-material)。分頁分為 core/editing/detection/automation/system 五類。 |
885885
| `main_widget.py` | 368 | 工作區:擁有 `QTabWidget`,依 `tab_registry.TAB_SPECS` 註冊 48 個分頁,並暴露 show/hide/activate/list API 給選單列與導覽面板。只有預設開啟的三個分頁與自己的 mixin 表單在啟動時建立,其餘第一次開啟才匯入模組、建立 widget。核心分頁在 `_own_tab_builders` 宣告 `(label_key, handler)` 動作對。 |
886-
| `tab_registry.py` | 124 | 分頁表:每個分頁一筆 `TabSpec`(鍵、標題鍵、分類、模組與類別名),`TabEntry` 在第一次存取 `widget` 時才呼叫 factory。不匯入 Qt。 |
886+
| `tab_registry.py` | 125 | 分頁表:每個分頁一筆 `TabSpec`(鍵、標題鍵、分類、模組與類別名),`TabEntry` 在第一次存取 `widget` 時才呼叫 factory。不匯入 Qt。 |
887887
| `navigation.py` | 200 | `NavigationPanel`:搜尋框 + 依分類的功能樹,列出每個已註冊分頁(開啟中的以粗體標示),只回報被選的鍵,開啟分頁仍由視窗負責。 |
888888
| `theme.py` | 178 | 設計 token(`ThemeTokens`:顏色、圓角、間距、字族)、深色與淺色兩組值、由 token 產生的樣式表與對應的 `QPalette`;不載入圖檔或字型檔。 |
889889
| `_auto_click_tab.py` | 291 | 自動點擊分頁的 mixin 建構器。 |
@@ -1079,7 +1079,7 @@ socket 預設綁 `127.0.0.1`;資源一律用 `with`。
10791079

10801080
| 層/子系統 | 檔案數 | 行數 |
10811081
| --- | ---: | ---: |
1082-
| `gui/` | 98 | 28,398 |
1082+
| `gui/` | 98 | 28,399 |
10831083
| `utils/mcp_server/` | 35 | 18,898 |
10841084
| `utils/remote_desktop/` | 56 | 13,014 |
10851085
| `utils/executor/` | 8 | 9,606 |
@@ -1100,5 +1100,5 @@ socket 預設綁 `127.0.0.1`;資源一律用 `with`。
11001100
| `autocontrol-lsp/` | 8 | 744 |
11011101
| `utils/hotkey/` | 7 | 852 |
11021102
| 其餘模組(約 286 個 `utils/` 子套件 + `android/`/`ios/`/周邊小工具) | 682 | 57,156 |
1103-
| **總計** | **1,062** | **158,221** |
1103+
| **總計** | **1,062** | **158,222** |
11041104

‎je_auto_control/gui/tab_registry.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def lazy_factory(module: str, class_name: str) -> WidgetFactory:
3131
"""Return a factory that imports ``module`` and builds ``class_name``."""
3232
def build() -> Any:
3333
# reason: both names come from the TAB_SPECS table below, never from user input.
34-
return getattr(import_module(module), class_name)() # nosemgrep: python.lang.security.audit.non-literal-import.non-literal-import
34+
loaded = import_module(module) # nosemgrep: python.lang.security.audit.non-literal-import.non-literal-import
35+
return getattr(loaded, class_name)()
3536
return build
3637

3738

0 commit comments

Comments
 (0)