diff --git a/marshmallow_polyfield/polyfield.py b/marshmallow_polyfield/polyfield.py index 4971778..944a88a 100644 --- a/marshmallow_polyfield/polyfield.py +++ b/marshmallow_polyfield/polyfield.py @@ -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): @@ -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 diff --git a/tests/shapes.py b/tests/shapes.py index 3e642bc..94ab399 100644 --- a/tests/shapes.py +++ b/tests/shapes.py @@ -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 @@ -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 diff --git a/tests/test_polyfield_base.py b/tests/test_polyfield_base.py index a2ff228..96d4969 100644 --- a/tests/test_polyfield_base.py +++ b/tests/test_polyfield_base.py @@ -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():