mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
Fix lint
This commit is contained in:
parent
27b49bcdca
commit
6257c80351
1 changed files with 5 additions and 2 deletions
|
|
@ -149,7 +149,7 @@ class SubprocessCLITransport(Transport):
|
|||
# Create a temp file for stderr to avoid pipe buffer deadlock
|
||||
# We can't use context manager as we need it for the subprocess lifetime
|
||||
self._stderr_file = tempfile.NamedTemporaryFile( # noqa: SIM115
|
||||
mode='w+', prefix='claude_stderr_', suffix='.log', delete=False
|
||||
mode="w+", prefix="claude_stderr_", suffix=".log", delete=False
|
||||
)
|
||||
|
||||
# Enable stdin pipe for both modes (but we'll close it for string mode)
|
||||
|
|
@ -354,7 +354,10 @@ class SubprocessCLITransport(Transport):
|
|||
# Convert deque to string for error reporting
|
||||
stderr_output = "\n".join(list(stderr_lines)) if stderr_lines else ""
|
||||
if len(stderr_lines) == stderr_lines.maxlen:
|
||||
stderr_output = f"[stderr truncated, showing last {stderr_lines.maxlen} lines]\n" + stderr_output
|
||||
stderr_output = (
|
||||
f"[stderr truncated, showing last {stderr_lines.maxlen} lines]\n"
|
||||
+ stderr_output
|
||||
)
|
||||
|
||||
# Use exit code for error detection, not string matching
|
||||
if returncode is not None and returncode != 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue