Skip to content

Commit

Permalink
censorship type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
gsfk committed Mar 27, 2024
1 parent 30b3dbb commit 216941d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bento_beacon/utils/censorship.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def set_censorship_settings(max_filters, count_threshold):


# saves settings to config as a side effect
def censorship_retry():
def censorship_retry() -> tuple[int | None, int | None]:
max_filters, count_threshold = katsu_censorship_settings()
if max_filters is None or count_threshold is None:
raise APIException(message="error reading censorship settings from katsu: "
Expand All @@ -22,12 +22,12 @@ def censorship_retry():
return max_filters, count_threshold


def threshold_retry():
def threshold_retry() -> int | None:
_, count_threshold = censorship_retry()
return count_threshold


def max_filters_retry():
def max_filters_retry() -> int | None:
max_filters, _ = censorship_retry()
return max_filters

Expand Down

0 comments on commit 216941d

Please sign in to comment.