MCPcopy Create free account
hub / github.com/fa0311/TwitterInternalAPIDocument / split_dispatch

Function split_dispatch

lib/legacy.py:47–62  ·  view source on GitHub ↗
(dispatch_list: list[dict])

Source from the content-addressed store, hash-verified

45
46
47def split_dispatch(dispatch_list: list[dict]) -> dict:
48 dispatch = get_dispatch_list()
49
50 dispatch_key = (
51 [d for d in dispatch.keys() if dispatch[d][1] in ["", "I"]],
52 [d for d in dispatch.keys() if dispatch[d][1] in ["URT"]],
53 [d for d in dispatch.keys() if dispatch[d][1] in ["Unversioned"]],
54 )
55
56 [d.update({"dispatch": dispatch[d["dispatch_key"]]}) for d in dispatch_list]
57
58 return (
59 [d for d in dispatch_list if d["dispatch_key"] in dispatch_key[0]],
60 [d for d in dispatch_list if d["dispatch_key"] in dispatch_key[1]],
61 [d for d in dispatch_list if d["dispatch_key"] in dispatch_key[2]],
62 )

Callers 1

generator.pyFile · 0.85

Calls 1

get_dispatch_listFunction · 0.85

Tested by

no test coverage detected