Skip to content

Commit

Permalink
switch to no-arg super() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky authored and Bachmann1234 committed Jan 18, 2020
1 parent b2edc67 commit 7b9548e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions marshmallow_polyfield/polyfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class PolyFieldBase(Field, metaclass=abc.ABCMeta):
def __init__(self, many=False, **metadata):
super(PolyFieldBase, self).__init__(**metadata)
super().__init__(**metadata)
self.many = many

def _deserialize(self, value, attr, parent, **kwargs):
Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(
and returns the appropriate schema
"""
super(PolyField, self).__init__(many=many, **metadata)
super().__init__(many=many, **metadata)
self._serialization_schema_selector_arg = serialization_schema_selector
self._deserialization_schema_selector_arg = deserialization_schema_selector

Expand Down
4 changes: 2 additions & 2 deletions tests/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def make_object(self, data, **_):

class Triangle(Shape):
def __init__(self, color, base, height):
super(Triangle, self).__init__(color)
super().__init__(color)
self.base = base
self.height = height

Expand All @@ -39,7 +39,7 @@ def make_object(self, data, **_):

class Rectangle(Shape):
def __init__(self, color, length, width):
super(Rectangle, self).__init__(color)
super().__init__(color)
self.length = length
self.width = width

Expand Down
4 changes: 2 additions & 2 deletions tests/test_polyfield_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

class TrivialExample(PolyFieldBase):
def serialization_schema_selector(self, value, obj):
super(TrivialExample, self).serialization_schema_selector(value, obj)
super().serialization_schema_selector(value, obj)

def deserialization_schema_selector(self, value, obj):
super(TrivialExample, self).deserialization_schema_selector(value, obj)
super().deserialization_schema_selector(value, obj)


def test_polyfield_base():
Expand Down

0 comments on commit 7b9548e

Please sign in to comment.