MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / transform_reactions

Function transform_reactions

agents/fetch_issues.py:84–91  ·  view source on GitHub ↗

Convert reactionGroups to a flat dict, dropping zeros.

(reaction_groups: list)

Source from the content-addressed store, hash-verified

82
83
84def transform_reactions(reaction_groups: list) -> dict:
85 """Convert reactionGroups to a flat dict, dropping zeros."""
86 reactions = {}
87 for rg in reaction_groups:
88 count = rg["users"]["totalCount"]
89 if count > 0:
90 reactions[rg["content"]] = count
91 return reactions
92
93
94def transform_timeline_event(event: dict) -> dict | None:

Callers 1

transform_issueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected