MCPcopy
hub / github.com/borgbackup/borg / SortBySpec

Function SortBySpec

src/borg/helpers/parseformat.py:417–423  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

415
416
417def SortBySpec(text):
418 from ..manifest import AI_HUMAN_SORT_KEYS
419
420 for sort_key in text.split(","):
421 if sort_key not in AI_HUMAN_SORT_KEYS and sort_key != "ts": # idempotency: do not reject ts
422 raise ArgumentTypeError("Invalid sort key: %s" % sort_key)
423 return text.replace("timestamp", "ts").replace("archive", "name")
424
425
426def format_file_size(v, precision=2, sign=False, iec=False):

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected