Skip to content

Commit

Permalink
fixes deprecated '/', see bazelbuild/bazel#5823
Browse files Browse the repository at this point in the history
  • Loading branch information
erickj committed Jan 2, 2019
1 parent fe53b34 commit e954ef2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/json_parser.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def _reduce_array(reductions):

def _reduce_object(reductions):
obj = dict()
for i in range(0, len(reductions) / 2):
for i in range(0, len(reductions) // 2):
idx = i * 2
key = reductions[idx]["reduction"]
val = reductions[idx + 1]["reduction"]
Expand Down Expand Up @@ -589,15 +589,15 @@ def _tokenize_int(collected_chars):
sig = int(sig)
for i in range(0, int(exp)):
if sign == "+":
if _MAX_INT / 10 <= sig:
if _MAX_INT // 10 <= sig:
return _MAX_INT
elif _MIN_INT / 10 >= sig:
elif _MIN_INT // 10 >= sig:
return _MIN_INT
sig *= 10
elif sign == "-":
if sig < 0:
return 0
sig /= 10
sig //= 10

return sig
elif collected_chars.find(".") >= 0:
Expand Down

0 comments on commit e954ef2

Please sign in to comment.