|
66 | 66 | class CombinerWithoutDefaults(ptransform.PTransform): |
67 | 67 | """Super class to inherit without_defaults to built-in Combiners.""" |
68 | 68 | def __init__(self, has_defaults=True): |
| 69 | + super(CombinerWithoutDefaults, self).__init__() |
69 | 70 | self.has_defaults = has_defaults |
70 | 71 |
|
71 | 72 | def with_defaults(self, has_defaults=True): |
@@ -802,9 +803,6 @@ def add_input(self, accumulator, element, *args, **kwargs): |
802 | 803 |
|
803 | 804 | class ToList(CombinerWithoutDefaults): |
804 | 805 | """A global CombineFn that condenses a PCollection into a single list.""" |
805 | | - def __init__(self, label='ToList'): # pylint: disable=useless-super-delegation |
806 | | - super(ToList, self).__init__(label) |
807 | | - |
808 | 806 | def expand(self, pcoll): |
809 | 807 | if self.has_defaults: |
810 | 808 | return pcoll | self.label >> core.CombineGlobally(ToListCombineFn()) |
@@ -838,9 +836,6 @@ class ToDict(CombinerWithoutDefaults): |
838 | 836 | If multiple values are associated with the same key, only one of the values |
839 | 837 | will be present in the resulting dict. |
840 | 838 | """ |
841 | | - def __init__(self, label='ToDict'): # pylint: disable=useless-super-delegation |
842 | | - super(ToDict, self).__init__(label) |
843 | | - |
844 | 839 | def expand(self, pcoll): |
845 | 840 | if self.has_defaults: |
846 | 841 | return pcoll | self.label >> core.CombineGlobally(ToDictCombineFn()) |
@@ -873,9 +868,6 @@ def extract_output(self, accumulator): |
873 | 868 |
|
874 | 869 | class ToSet(CombinerWithoutDefaults): |
875 | 870 | """A global CombineFn that condenses a PCollection into a set.""" |
876 | | - def __init__(self, label='ToSet'): # pylint: disable=useless-super-delegation |
877 | | - super(ToSet, self).__init__(label) |
878 | | - |
879 | 871 | def expand(self, pcoll): |
880 | 872 | if self.has_defaults: |
881 | 873 | return pcoll | self.label >> core.CombineGlobally(ToSetCombineFn()) |
|
0 commit comments