@@ -114,9 +114,7 @@ class ParseGameEventFn(beam.DoFn):
114114 The human-readable time string is not used here.
115115 """
116116 def __init__ (self ):
117- # TODO(BEAM-6158): Revert the workaround once we can pickle super() on py3.
118- # super().__init__()
119- beam .DoFn .__init__ (self )
117+ super ().__init__ ()
120118 self .num_parse_errors = Metrics .counter (self .__class__ , 'num_parse_errors' )
121119
122120 def process (self , elem ):
@@ -140,9 +138,8 @@ class ExtractAndSumScore(beam.PTransform):
140138 extracted.
141139 """
142140 def __init__ (self , field ):
143- # TODO(BEAM-6158): Revert the workaround once we can pickle super() on py3.
144- # super().__init__()
145- beam .PTransform .__init__ (self )
141+ super ().__init__ ()
142+
146143 self .field = field
147144
148145 def expand (self , pcoll ):
@@ -180,9 +177,8 @@ def __init__(self, table_name, dataset, schema, project):
180177 schema: Dictionary in the format {'column_name': 'bigquery_type'}
181178 project: Name of the Cloud project containing BigQuery table.
182179 """
183- # TODO(BEAM-6158): Revert the workaround once we can pickle super() on py3.
184- # super().__init__()
185- beam .PTransform .__init__ (self )
180+ super ().__init__ ()
181+
186182 self .table_name = table_name
187183 self .dataset = dataset
188184 self .schema = schema
@@ -210,9 +206,8 @@ class CalculateTeamScores(beam.PTransform):
210206 default.
211207 """
212208 def __init__ (self , team_window_duration , allowed_lateness ):
213- # TODO(BEAM-6158): Revert the workaround once we can pickle super() on py3.
214- # super().__init__()
215- beam .PTransform .__init__ (self )
209+ super ().__init__ ()
210+
216211 self .team_window_duration = team_window_duration * 60
217212 self .allowed_lateness_seconds = allowed_lateness * 60
218213
@@ -242,9 +237,8 @@ class CalculateUserScores(beam.PTransform):
242237 global windowing. Get periodic updates on all users' running scores.
243238 """
244239 def __init__ (self , allowed_lateness ):
245- # TODO(BEAM-6158): Revert the workaround once we can pickle super() on py3.
246- # super().__init__()
247- beam .PTransform .__init__ (self )
240+ super ().__init__ ()
241+
248242 self .allowed_lateness_seconds = allowed_lateness * 60
249243
250244 def expand (self , pcoll ):
0 commit comments