Skip to content

The open-source AI voice studio. Clone, dictate, create.

fix(backend): suppress E402 for intentionally-late MLX imports

JnyRoad1a803aa05f2d
diff --git a/backend/backends/mlx_backend.py b/backend/backends/mlx_backend.py
index 84b9b620..ad287bca 100644
--- a/backend/backends/mlx_backend.py
+++ b/backend/backends/mlx_backend.py
@@ -27,19 +27,19 @@ def _run_on_mlx_thread(func, *args):
# PATCH: Import and apply offline patch BEFORE any huggingface_hub usage
# This prevents mlx_audio from making network requests when models are cached
-from ..utils.hf_offline_patch import patch_huggingface_hub_offline, ensure_original_qwen_config_cached
+from ..utils.hf_offline_patch import patch_huggingface_hub_offline, ensure_original_qwen_config_cached # noqa: E402
patch_huggingface_hub_offline()
ensure_original_qwen_config_cached()
-from . import TTSBackend, STTBackend, LANGUAGE_CODE_TO_NAME, WHISPER_HF_REPOS
-from .base import (
+from . import TTSBackend, STTBackend, LANGUAGE_CODE_TO_NAME, WHISPER_HF_REPOS # noqa: E402
+from .base import ( # noqa: E402
is_model_cached,
combine_voice_prompts as _combine_voice_prompts,
model_load_progress,
empty_mlx_cache,
)
-from ..utils.cache import get_cache_key, get_cached_voice_prompt, cache_voice_prompt
+from ..utils.cache import get_cache_key, get_cached_voice_prompt, cache_voice_prompt # noqa: E402
class MLXTTSBackend: