MCPcopy Create free account
hub / github.com/simplejson/simplejson / strip_python_stderr

Function strip_python_stderr

simplejson/tests/test_tool.py:9–11  ·  view source on GitHub ↗

Strip debug-build refcount output from stderr.

(stderr)

Source from the content-addressed store, hash-verified

7import tempfile
8
9def strip_python_stderr(stderr):
10 """Strip debug-build refcount output from stderr."""
11 return re.sub(b"\\[\\d+ refs\\]\\r?\\n?$", b"", stderr).strip()
12
13def open_temp_file():
14 file = tempfile.NamedTemporaryFile(delete=False)

Callers 1

runToolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…