@@ -48,9 +48,7 @@ class GtidEvent(BinLogEvent):
48
48
"""GTID change in binlog event"""
49
49
50
50
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
51
- super (GtidEvent , self ).__init__ (
52
- from_packet , event_size , table_map , ctl_connection , ** kwargs
53
- )
51
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
54
52
55
53
self .commit_flag = self .packet .read (1 ) == 1
56
54
self .sid = self .packet .read (16 )
@@ -82,9 +80,7 @@ class RotateEvent(BinLogEvent):
82
80
"""
83
81
84
82
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
85
- super (RotateEvent , self ).__init__ (
86
- from_packet , event_size , table_map , ctl_connection , ** kwargs
87
- )
83
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
88
84
self .position = struct .unpack ("<Q" , self .packet .read (8 ))[0 ]
89
85
self .next_binlog = self .packet .read (event_size - 8 ).decode ()
90
86
@@ -105,15 +101,13 @@ class XidEvent(BinLogEvent):
105
101
"""
106
102
107
103
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
108
- super (XidEvent , self ).__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
104
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
109
105
self .xid = struct .unpack ("<Q" , self .packet .read (8 ))[0 ]
110
106
111
107
112
108
class HeartbeatLogEvent (BinLogEvent ):
113
109
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
114
- super (HeartbeatLogEvent , self ).__init__ (
115
- from_packet , event_size , table_map , ctl_connection , ** kwargs
116
- )
110
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
117
111
self .ident = self .packet .read (event_size ).decode ()
118
112
119
113
@@ -122,9 +116,7 @@ class QueryEvent(BinLogEvent):
122
116
Only replicated queries are logged."""
123
117
124
118
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
125
- super (QueryEvent , self ).__init__ (
126
- from_packet , event_size , table_map , ctl_connection , ** kwargs
127
- )
119
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
128
120
129
121
# Post-header
130
122
self .slave_proxy_id = self .packet .read_uint32 ()
@@ -153,9 +145,7 @@ class BeginLoadQueryEvent(BinLogEvent):
153
145
"""
154
146
155
147
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
156
- super (BeginLoadQueryEvent , self ).__init__ (
157
- from_packet , event_size , table_map , ctl_connection , ** kwargs
158
- )
148
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
159
149
160
150
# Payload
161
151
self .file_id = self .packet .read_uint32 ()
@@ -179,9 +169,7 @@ class ExecuteLoadQueryEvent(BinLogEvent):
179
169
"""
180
170
181
171
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
182
- super (ExecuteLoadQueryEvent , self ).__init__ (
183
- from_packet , event_size , table_map , ctl_connection , ** kwargs
184
- )
172
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
185
173
186
174
# Post-header
187
175
self .slave_proxy_id = self .packet .read_uint32 ()
@@ -206,9 +194,7 @@ class IntvarEvent(BinLogEvent):
206
194
"""
207
195
208
196
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
209
- super (IntvarEvent , self ).__init__ (
210
- from_packet , event_size , table_map , ctl_connection , ** kwargs
211
- )
197
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
212
198
213
199
# Payload
214
200
self .type = self .packet .read_uint8 ()
@@ -217,7 +203,5 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)
217
203
218
204
class NotImplementedEvent (BinLogEvent ):
219
205
def __init__ (self , from_packet , event_size , table_map , ctl_connection , ** kwargs ):
220
- super (NotImplementedEvent , self ).__init__ (
221
- from_packet , event_size , table_map , ctl_connection , ** kwargs
222
- )
206
+ super ().__init__ (from_packet , event_size , table_map , ctl_connection , ** kwargs )
223
207
self .packet .advance (event_size )
0 commit comments