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.
This commit is contained in:
2026-08-04 21:07:10 +02:00
parent f76c059fca
commit 701ef0d516

View File

@@ -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__))