From 9ef4ae093f048d2f68e85c72d24582021870cd56 Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Sat, 1 Aug 2026 09:27:29 +0800 Subject: [PATCH] =?UTF-8?q?style:=20ruff=20format=20=E2=80=94=E2=80=94=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=90=8C=E6=AD=A5=E5=86=99=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=80=E7=9B=B4=E6=B2=A1=E8=BF=87=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fish/maestro/openai 三个 CLI 的 Lint job 是红的,失败文件的最后改动都是 `sync: update from Docs [automated]`——同步机器人写入的代码不过 `ruff format --check`,于是 CI 从那时起就一直红着。 不是某个 PR 引入的,是同步链路缺一道格式化。先把存量修平。 Co-Authored-By: Claude --- fish/fish_cli/core/client.py | 3 +-- fish/tests/test_commands.py | 12 +++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/fish/fish_cli/core/client.py b/fish/fish_cli/core/client.py index e407c65..436857d 100644 --- a/fish/fish_cli/core/client.py +++ b/fish/fish_cli/core/client.py @@ -24,8 +24,7 @@ def _get_headers(self, extra: dict[str, str] | None = None) -> dict[str, str]: """Get request headers with authentication.""" if not self.api_token: raise FishAuthError( - "API token not configured. " - "Set ACEDATACLOUD_API_TOKEN or use --token option." + "API token not configured. Set ACEDATACLOUD_API_TOKEN or use --token option." ) headers = { "accept": "application/json", diff --git a/fish/tests/test_commands.py b/fish/tests/test_commands.py index 5817365..3e114a7 100644 --- a/fish/tests/test_commands.py +++ b/fish/tests/test_commands.py @@ -62,9 +62,7 @@ def test_tts_json(self, runner, mock_tts_response): respx.post("https://api.acedata.cloud/fish/tts").mock( return_value=Response(200, json=mock_tts_response) ) - result = runner.invoke( - cli, ["--token", "test-token", "tts", "Hello, world!", "--json"] - ) + result = runner.invoke(cli, ["--token", "test-token", "tts", "Hello, world!", "--json"]) assert result.exit_code == 0 data = json.loads(result.output) assert "audio_url" in data @@ -226,9 +224,7 @@ def test_tts_async(self, runner, mock_tts_async_response): route = respx.post("https://api.acedata.cloud/fish/tts").mock( return_value=Response(200, json=mock_tts_async_response) ) - result = runner.invoke( - cli, ["--token", "test-token", "tts", "Hello", "--async", "--json"] - ) + result = runner.invoke(cli, ["--token", "test-token", "tts", "Hello", "--async", "--json"]) assert result.exit_code == 0 sent = json.loads(route.calls[0].request.content) assert sent["async"] is True @@ -238,9 +234,7 @@ def test_tts_async_rich_output(self, runner, mock_tts_async_response): respx.post("https://api.acedata.cloud/fish/tts").mock( return_value=Response(200, json=mock_tts_async_response) ) - result = runner.invoke( - cli, ["--token", "test-token", "tts", "Hello", "--async"] - ) + result = runner.invoke(cli, ["--token", "test-token", "tts", "Hello", "--async"]) assert result.exit_code == 0 assert "2725a2d3" in result.output