Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/generate_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def render_example_file(
lines.append("")
lines.append("")
lines.append("async def main():")
lines.append(f" async with AsyncTikHub(api_key=API_KEY) as client:")
lines.append(" async with AsyncTikHub(api_key=API_KEY) as client:")

for entry in ops:
kwargs, body_kind = collect_call_kwargs(entry["op"], spec)
Expand All @@ -257,7 +257,7 @@ def render_example_file(
lines.append(f" # {summary.rstrip()}")

if body_kind == "multipart":
lines.append(f" # Skipped: multipart upload (needs a real file)")
lines.append(" # Skipped: multipart upload (needs a real file)")
else:
if kwargs:
args = ", ".join(f"{k}={py_literal(v)}" for k, v in kwargs.items())
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_health_no_api_key():
result = runner.invoke(app, ["health"])
assert result.exit_code == 2
# Confirm it's the SDK config error, not a typer crash.
assert "API key" in result.stderr or "API key" in result.stdout
assert "API key" in result.output


def test_health_upstream_error(monkeypatch: pytest.MonkeyPatch):
Expand All @@ -173,4 +173,4 @@ def handler(request: httpx.Request) -> httpx.Response:
)
result = runner.invoke(app, ["health"])
assert result.exit_code == 1
assert "500" in (result.stderr + result.stdout)
assert "500" in result.output
Loading