MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / _normalize_sort_by

Method _normalize_sort_by

apps/admin/services.py:1402–1406  ·  view source on GitHub ↗
(self, sort_by: str)

Source from the content-addressed store, hash-verified

1400 return True
1401
1402 def _normalize_sort_by(self, sort_by: str) -> str:
1403 normalized = sort_by.replace("-", "_").strip().lower()
1404 if normalized not in self.SORT_FIELDS:
1405 return "created_at"
1406 return normalized
1407
1408 def _get_sort_value(self, item: dict[str, Any], sort_by: str):
1409 def date_value(value: Any) -> float:

Callers 1

list_filesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected