Skip to content

Commit 57ec7f5

Browse files
committed
Apply linter on packet.py
1 parent 63fb47f commit 57ec7f5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pymysqlreplication/packet.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def read_offset_or_inline(packet, large):
2828
return (t, packet.read_uint32(), None)
2929
return (t, packet.read_uint16(), None)
3030

31+
3132
class BinLogPacketWrapper(StructMysql):
3233
"""
3334
Bin Log Packet Wrapper. It uses an existing packet object, and wraps
@@ -56,7 +57,7 @@ class BinLogPacketWrapper(StructMysql):
5657
constants.WRITE_ROWS_EVENT_V2: row_event.WriteRowsEvent,
5758
constants.DELETE_ROWS_EVENT_V2: row_event.DeleteRowsEvent,
5859
constants.TABLE_MAP_EVENT: row_event.TableMapEvent,
59-
#5.6 GTID enabled replication events
60+
# 5.6 GTID enabled replication events
6061
constants.ANONYMOUS_GTID_LOG_EVENT: event.NotImplementedEvent,
6162
constants.PREVIOUS_GTIDS_LOG_EVENT: event.NotImplementedEvent
6263

@@ -105,7 +106,8 @@ def __init__(self, from_packet, table_map,
105106
event_size_without_header = self.event_size - 19
106107

107108
self.event = None
108-
event_class = self.__event_map.get(self.event_type, event.NotImplementedEvent)
109+
event_class = self.__event_map.get(
110+
self.event_type, event.NotImplementedEvent)
109111

110112
if event_class not in allowed_events:
111113
return
@@ -366,12 +368,12 @@ def read_binary_json_object(self, length, large):
366368
key_offset_lengths = [(
367369
self.read_uint32(), # offset (we don't actually need that)
368370
self.read_uint16() # size of the key
369-
) for _ in range(elements)]
371+
) for _ in range(elements)]
370372
else:
371373
key_offset_lengths = [(
372374
self.read_uint16(), # offset (we don't actually need that)
373375
self.read_uint16() # size of key
374-
) for _ in range(elements)]
376+
) for _ in range(elements)]
375377

376378
value_type_inlined_lengths = [read_offset_or_inline(self, large)
377379
for _ in range(elements)]

0 commit comments

Comments
 (0)