Removed unused to_non_negative_float() function.

This commit is contained in:
Steve Howell
2016-07-08 20:57:27 -07:00
committed by Tim Abbott
parent b7ec66fc96
commit c680c6a981
2 changed files with 1 additions and 8 deletions

View File

@@ -477,13 +477,6 @@ def to_non_negative_int(x):
raise ValueError("argument is negative")
return x
def to_non_negative_float(x):
# type: (float) -> float
x = float(x)
if x < 0:
raise ValueError("argument is negative")
return x
def flexible_boolean(boolean):
# type: (text_type) -> bool
"""Returns True for any of "1", "true", or "True". Returns False otherwise."""

View File

@@ -13,7 +13,7 @@ from zerver.lib.str_utils import force_bytes
from zerver.decorator import authenticated_api_view, authenticated_json_post_view, \
has_request_variables, REQ, JsonableError, \
to_non_negative_int, to_non_negative_float
to_non_negative_int
from django.utils.html import escape as escape_html
from zerver.lib import bugdown
from zerver.lib.actions import recipient_for_emails, do_update_message_flags, \