MCPcopy Index your code
hub / github.com/tanelpoder/0xtools / sort_key

Method sort_key

xtop/core/time_utils.py:96–99  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

94 return sorted(data, key=lambda x: (x.get('HH', '00'), x.get('MI', '00')))
95 else: # HH:MI:S10
96 def sort_key(x):
97 s10_val = x.get('S10', '00')
98 s10 = TimeUtils.parse_s10_value(s10_val)
99 return (x.get('HH', '00'), x.get('MI', '00'), f"{s10:02d}")
100 return sorted(data, key=sort_key)
101
102 @staticmethod

Callers

nothing calls this directly

Calls 1

parse_s10_valueMethod · 0.80

Tested by

no test coverage detected