mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-07-07 14:45:00 +00:00
Fix linting issues
This commit is contained in:
parent
404c50bce0
commit
9ef9da9ab6
2 changed files with 4 additions and 4 deletions
|
@ -171,7 +171,7 @@ class SubprocessCLITransport(Transport):
|
||||||
raise CLIConnectionError("Not connected")
|
raise CLIConnectionError("Not connected")
|
||||||
|
|
||||||
json_buffer = ""
|
json_buffer = ""
|
||||||
|
|
||||||
# Process stdout messages first
|
# Process stdout messages first
|
||||||
try:
|
try:
|
||||||
async for line in self._stdout_stream:
|
async for line in self._stdout_stream:
|
||||||
|
|
|
@ -9,7 +9,7 @@ def test_no_task_groups_in_receive_messages():
|
||||||
"""Verify receive_messages doesn't use task groups (fixes FastAPI issue #4)."""
|
"""Verify receive_messages doesn't use task groups (fixes FastAPI issue #4)."""
|
||||||
# Get the source code of receive_messages
|
# Get the source code of receive_messages
|
||||||
source = inspect.getsource(SubprocessCLITransport.receive_messages)
|
source = inspect.getsource(SubprocessCLITransport.receive_messages)
|
||||||
|
|
||||||
# The fix: ensure no task group or task creation
|
# The fix: ensure no task group or task creation
|
||||||
assert "create_task_group" not in source, (
|
assert "create_task_group" not in source, (
|
||||||
"receive_messages must not use create_task_group to avoid "
|
"receive_messages must not use create_task_group to avoid "
|
||||||
|
@ -19,7 +19,7 @@ def test_no_task_groups_in_receive_messages():
|
||||||
"receive_messages must not create tasks to maintain "
|
"receive_messages must not create tasks to maintain "
|
||||||
"compatibility with FastAPI's generator handling"
|
"compatibility with FastAPI's generator handling"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify stderr is still being read (sequential approach)
|
# Verify stderr is still being read (sequential approach)
|
||||||
assert "_stderr_stream" in source, "Should still read stderr"
|
assert "_stderr_stream" in source, "Should still read stderr"
|
||||||
assert "stderr_lines" in source, "Should collect stderr output"
|
assert "stderr_lines" in source, "Should collect stderr output"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue