Initial upload: git-insights-cli with CI/CD workflow
Some checks failed
CI / build (push) Has been cancelled
CI / release (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
2026-01-30 20:35:26 +00:00
parent 824a5acfbf
commit cfc3a966a9

View File

@@ -0,0 +1,15 @@
import json
from typing import Any
from src.formatters.base import BaseFormatter
class JSONFormatter(BaseFormatter):
"""JSON output formatter."""
@staticmethod
def format(data: Any) -> str:
"""Format data as JSON."""
if hasattr(data, "to_dict"):
data = data.to_dict()
return json.dumps(data, indent=2, default=str)