Coverage for polar/customer/sorting.py: 100%
9 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 16:17 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 16:17 +0000
1from enum import StrEnum 1a
2from typing import Annotated 1a
4from fastapi import Depends 1a
6from polar.kit.sorting import Sorting, SortingGetter 1a
9class CustomerSortProperty(StrEnum): 1a
10 created_at = "created_at" 1a
11 email = "email" 1a
12 customer_name = "name" # `name` is a reserved word, so we use `customer_name` 1a
15ListSorting = Annotated[ 1a
16 list[Sorting[CustomerSortProperty]],
17 Depends(SortingGetter(CustomerSortProperty, ["-created_at"])),
18]