Skip to content

Commit

Permalink
Removed modern python syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman committed Feb 28, 2024
1 parent 6c7031a commit b6ab070
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fedn/fedn/network/api/v1/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_use_typing(headers: object) -> bool:


def get_limit(headers: object) -> int:
limit: str | None = headers.get("X-Limit")
limit: str = headers.get("X-Limit")
if is_positive_integer(limit):
return int(limit)
return 0
Expand All @@ -40,9 +40,9 @@ def get_skip(headers: object) -> int:

def get_typed_list_headers(
headers: object,
) -> Tuple[int | None, int | None, str | None, int, bool]:
sort_key: str | None = headers.get("X-Sort-Key")
sort_order: str | None = headers.get("X-Sort-Order")
) -> Tuple[int, int, str, int, bool]:
sort_key: str = headers.get("X-Sort-Key")
sort_order: str = headers.get("X-Sort-Order")

limit: int = get_limit(headers)
skip: int = get_skip(headers)
Expand Down

0 comments on commit b6ab070

Please sign in to comment.