From 701ef0d51674d0375e883fff9f5de9b152d221ba Mon Sep 17 00:00:00 2001 From: viewit Date: Tue, 4 Aug 2026 21:07:10 +0200 Subject: [PATCH] refactor(bridge): drop now-unused imports from the facade (stage 3 cleanup) After extracting everything into modules/mixins, several stdlib imports in kobrax_moonraker_bridge.py (sqlite3, uuid, hashlib, tempfile, subprocess, pathlib, html, urllib.parse.quote) are no longer referenced there - they travelled with GCodeStore/credentials/camera/endpoints. Removed. Facade is now 1315 lines (down from 6368). All 184 tests green; live-verified against a real printer that every mixin's endpoints resolve and serve correctly (kobra_state, AMS slots flowing end to end). PyInstaller spec needs no change - all 12 new modules are statically importable from the facade. --- kobrax_moonraker_bridge.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kobrax_moonraker_bridge.py b/kobrax_moonraker_bridge.py index cd8bd0b..0998a3c 100644 --- a/kobrax_moonraker_bridge.py +++ b/kobrax_moonraker_bridge.py @@ -26,27 +26,19 @@ This project is not affiliated with Anycubic. See NOTICE.md for details. """ import argparse -import sqlite3 -import uuid try: import config_loader as env_loader except ImportError: import env_loader import asyncio -import hashlib import copy import json import logging import os -import pathlib import re -import subprocess import sys -import tempfile import time import threading -import html -from urllib.parse import quote # For PyInstaller binaries everything sits next to sys.executable, otherwise next to __file__ _BASE = os.path.dirname(sys.executable) if getattr(sys, "frozen", False) else os.path.dirname(os.path.abspath(__file__))