fix(weekly-report): handle numpy.bool_ in JSON serialization
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -344,8 +344,8 @@ def send_report(content: str, webhook_url: str | None = None) -> None:
|
|||||||
|
|
||||||
def _sanitize(obj):
|
def _sanitize(obj):
|
||||||
"""JSON 직렬화를 위해 numpy/inf 값을 변환."""
|
"""JSON 직렬화를 위해 numpy/inf 값을 변환."""
|
||||||
if isinstance(obj, bool):
|
if isinstance(obj, (bool, np.bool_)):
|
||||||
return obj
|
return bool(obj)
|
||||||
if isinstance(obj, (np.integer,)):
|
if isinstance(obj, (np.integer,)):
|
||||||
return int(obj)
|
return int(obj)
|
||||||
if isinstance(obj, (np.floating,)):
|
if isinstance(obj, (np.floating,)):
|
||||||
|
|||||||
Reference in New Issue
Block a user