Skip to content

Commit 787f5bf

Browse files
committed
Refactor and clean up TTSFM web and core modules
This commit improves code organization, formatting, and import order across the ttsfm-web Flask app, i18n, websocket handler, and run script. It also refactors the main ttsfm package __init__.py for clearer exports, updates async_client.py for better logging and structure, and removes unnecessary imports in audio.py. Minor test import order fixes are included. No functional changes are introduced.
1 parent 3a1429b commit 787f5bf

File tree

14 files changed

+709
-513
lines changed

14 files changed

+709
-513
lines changed

tests/test_clients.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import pytest
21
import types
32

4-
from ttsfm.client import TTSClient
3+
import pytest
4+
55
from ttsfm.async_client import AsyncTTSClient
6-
from ttsfm.models import TTSResponse, AudioFormat
6+
from ttsfm.client import TTSClient
7+
from ttsfm.models import AudioFormat, TTSResponse
78

89

910
def _mk_response(data: bytes) -> TTSResponse:

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def test_header_generation_deterministic_upgrade_flag(monkeypatch):
5757
@pytest.mark.asyncio
5858
async def test_async_batch_propagates_original_exception(monkeypatch):
5959
from ttsfm.async_client import AsyncTTSClient
60-
from ttsfm.models import TTSRequest, Voice
6160
from ttsfm.exceptions import NetworkException
61+
from ttsfm.models import TTSRequest, Voice
6262

6363
client = AsyncTTSClient()
6464

0 commit comments

Comments
 (0)