MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _clean

Function _clean

src/pyspector/reporting.py:47–66  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

45
46
47def _clean(obj):
48
49 if isinstance(obj, list):
50 return [_clean(item) for item in obj]
51
52 if isinstance(obj, dict):
53 return {
54 k: _clean(v)
55 for k, v in obj.items()
56 if v is not None
57 }
58
59 if hasattr(obj, "__dict__"):
60 return {
61 k: _clean(v)
62 for k, v in obj.__dict__.items()
63 if v is not None
64 }
65
66 return obj
67
68
69class Reporter:

Callers 1

to_sarifMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected