mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
Reorganize imports in client.py
- Move json import to top-level imports - Add asyncio and contextlib.suppress imports for future use - Remove inline json import from query method 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cc81142feb
commit
baee8bae42
1 changed files with 3 additions and 2 deletions
|
|
@ -1,7 +1,10 @@
|
|||
"""Claude SDK Client for interacting with Claude Code."""
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import os
|
||||
from collections.abc import AsyncIterable, AsyncIterator
|
||||
from contextlib import suppress
|
||||
from typing import Any
|
||||
|
||||
from ._errors import CLIConnectionError
|
||||
|
|
@ -164,8 +167,6 @@ class ClaudeSDKClient:
|
|||
if not self._query or not self._transport:
|
||||
raise CLIConnectionError("Not connected. Call connect() first.")
|
||||
|
||||
import json
|
||||
|
||||
# Handle string prompts
|
||||
if isinstance(prompt, str):
|
||||
message = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue