Put missing blank lines after return statements.

This commit is contained in:
Łukasz Langa 2018-08-17 10:29:19 -07:00
parent ebbb98919d
commit 71bdd727a8

View File

@ -2545,6 +2545,7 @@ def format_float_or_int_string(text: str, allow_underscores: bool) -> str:
"""Formats a float string like "1.0".""" """Formats a float string like "1.0"."""
if "." not in text: if "." not in text:
return format_int_string(text, allow_underscores) return format_int_string(text, allow_underscores)
before, after = text.split(".") before, after = text.split(".")
before = format_int_string(before, allow_underscores) if before else "0" before = format_int_string(before, allow_underscores) if before else "0"
after = format_int_string(after, allow_underscores) if after else "0" after = format_int_string(after, allow_underscores) if after else "0"
@ -2558,10 +2559,12 @@ def format_int_string(text: str, allow_underscores: bool) -> str:
""" """
if not allow_underscores: if not allow_underscores:
return text return text
text = text.replace("_", "") text = text.replace("_", "")
if len(text) <= 6: if len(text) <= 6:
# No underscores for numbers <= 6 digits long. # No underscores for numbers <= 6 digits long.
return text return text
return format(int(text), "3_") return format(int(text), "3_")