style: remove extra brackets one more time

This commit is contained in:
Vetoshkin Nikita
2013-10-03 18:11:07 +04:00
committed by David Arthur
parent a6b314d963
commit e82f04e3b8

View File

@@ -26,14 +26,14 @@ def read_short_string(data, cur):
(strlen,) = struct.unpack('>h', data[cur:cur + 2])
if strlen == -1:
return (None, cur + 2)
return None, cur + 2
cur += 2
if len(data) < cur + strlen:
raise BufferUnderflowError("Not enough data left")
out = data[cur:cur + strlen]
return (out, cur + strlen)
return out, cur + strlen
def read_int_string(data, cur):
@@ -43,14 +43,14 @@ def read_int_string(data, cur):
(strlen,) = struct.unpack('>i', data[cur:cur + 4])
if strlen == -1:
return (None, cur + 4)
return None, cur + 4
cur += 4
if len(data) < cur + strlen:
raise BufferUnderflowError("Not enough data left")
out = data[cur:cur + strlen]
return (out, cur + strlen)
return out, cur + strlen
def relative_unpack(fmt, data, cur):
@@ -59,7 +59,7 @@ def relative_unpack(fmt, data, cur):
raise BufferUnderflowError("Not enough data left")
out = struct.unpack(fmt, data[cur:cur + size])
return (out, cur + size)
return out, cur + size
def group_by_topic_and_partition(tuples):