Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
hssahota2 committed Apr 3, 2024
1 parent d6b542f commit 758cf81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/selfie-lib/selfie_lib/ArrayMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ def _compare_normal(a, b) -> int:
else:
return 1


def _compare_string_slash_first(a: str, b: str) -> int:
return _compare_normal(a.replace("/", "\0"), b.replace("/", "\0"))


def _binary_search(data, item) -> int:
compare_func = _compare_string_slash_first if isinstance(item, str) else _compare_normal
compare_func = (
_compare_string_slash_first if isinstance(item, str) else _compare_normal
)
low, high = 0, len(data) - 1
while low <= high:
mid = (low + high) // 2
Expand Down

0 comments on commit 758cf81

Please sign in to comment.