From 9b5915888a4bb11b68c1ff4ffdfa661d284968c1 Mon Sep 17 00:00:00 2001 From: dazedanon Date: Thu, 12 Mar 2026 21:58:51 -0500 Subject: [PATCH] smol --- gui/workflow_tab.py | 23 +++-------------------- requirements.txt | 1 + 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/gui/workflow_tab.py b/gui/workflow_tab.py index 74f32a0..f9a80d8 100644 --- a/gui/workflow_tab.py +++ b/gui/workflow_tab.py @@ -20,6 +20,8 @@ import sys import threading from pathlib import Path +import jsbeautifier + from PyQt5.QtCore import Qt, QSettings, QThread, QTimer, pyqtSignal from PyQt5.QtGui import QFont from PyQt5.QtWidgets import ( @@ -51,7 +53,7 @@ from PyQt5.QtWidgets import ( PHASE1_CONFIG = { # Safe dialogue / choices - "CODE101": False, + "CODE101": True, "CODE401": True, "CODE405": True, "CODE102": True, @@ -238,25 +240,6 @@ class _JsFormatWorker(QThread): self.js_path = js_path def run(self): - import subprocess as _sp - import sys - try: - import jsbeautifier - except ImportError: - self.log.emit("jsbeautifier not installed — installing via pip…") - r = _sp.run( - [sys.executable, "-m", "pip", "install", "jsbeautifier"], - capture_output=True, text=True, - ) - if r.returncode != 0: - self.done.emit(False, f"pip install failed: {r.stderr.strip()}") - return - self.log.emit("jsbeautifier installed.") - try: - import jsbeautifier - except ImportError: - self.done.emit(False, "jsbeautifier could not be imported after install.") - return try: p = Path(self.js_path) self.log.emit(f"Formatting {p.name} …") diff --git a/requirements.txt b/requirements.txt index 81dc4f5..84cd0a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,5 +6,6 @@ retry>=0.9.2 ruamel.yaml>=0.17.32 tiktoken>=0.8.0 tqdm>=4.65.0 +jsbeautifier>=1.14.0 pillow>=12.1.0 PyQt5>=5.15.0