refactor: clean up unused imports and improve code organization

This commit is contained in:
2025-03-26 10:21:11 +01:00
parent 12d54c78a9
commit f6f9f89354
40 changed files with 90 additions and 102 deletions

View File

@@ -10,43 +10,11 @@
from PyQt6.QtCore import (
QCoreApplication,
QDate,
QDateTime,
QLocale,
QMetaObject,
QObject,
QPoint,
QRect,
QSize,
Qt,
QTime,
QUrl,
)
from PyQt6.QtGui import (
QBrush,
QColor,
QConicalGradient,
QCursor,
QFont,
QFontDatabase,
QGradient,
QIcon,
QImage,
QKeySequence,
QLinearGradient,
QPainter,
QPalette,
QPixmap,
QRadialGradient,
QTransform,
)
from PyQt6.QtWidgets import (
QApplication,
QDialog,
QGridLayout,
QSizePolicy,
QTabWidget,
QWidget,
)

View File

@@ -0,0 +1,15 @@
import os
import sys
def run_mkdocs():
with open(os.devnull, "w") as devnull:
old_stdout = sys.stdout
old_stderr = sys.stderr
sys.stdout = devnull
sys.stderr = devnull
try:
os.system("mkdocs serve -q")
finally:
sys.stdout = old_stdout
sys.stderr = old_stderr

View File

@@ -2,7 +2,6 @@ import os
import sys
# from PyQt6 import Webview
from PyQt6.QtWebEngineWidgets import QWebEngineView
from PyQt6.QtWidgets import QApplication, QMainWindow, QTabWidget
documentation_path = "docs"
@@ -36,9 +35,8 @@ class DocumentationViewer(QMainWindow):
tab_name="Documentation",
html_content="<h1>Documentation</h1><p>Your HTML documentation content goes here.</p>",
):
documentation_tab = QWebEngineView()
documentation_tab.setHtml(html_content)
self.tabs.addTab(documentation_tab, tab_name)
# open documentation
name = tab_name
if __name__ == "__main__":

View File

@@ -1,14 +1,9 @@
from datetime import datetime
from docx import Document
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.enum.table import WD_ROW_HEIGHT_RULE
from docx.shared import Pt, RGBColor, Cm, Inches
from docx.shared import Pt, RGBColor, Cm
from docx.oxml import OxmlElement
from docx.oxml.ns import qn
from docx2pdf import convert
import win32print
import win32api
import tempfile
import os
from os.path import basename