Skip to content

Commit

Permalink
Merge pull request marshmallow-code#1209 from rooterkyberian/remove_e…
Browse files Browse the repository at this point in the history
…rror_param

removed unused `error` argument
  • Loading branch information
sloria committed May 6, 2019
2 parents a04d481 + 1058eb7 commit 5ec6df6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/marshmallow/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def __init__(
default=missing_,
attribute=None,
data_key=None,
error=None,
validate=None,
required=False,
allow_none=None,
Expand Down Expand Up @@ -1183,7 +1182,6 @@ class TimeDelta(Field):
:param str precision: Influences how the integer is interpreted during
(de)serialization. Must be 'days', 'seconds', 'microseconds',
'milliseconds', 'minutes', 'hours' or 'weeks'.
:param str error: Error message stored upon validation failure.
:param kwargs: The same keyword arguments that :class:`Field` receives.
.. versionchanged:: 2.0.0
Expand All @@ -1204,7 +1202,7 @@ class TimeDelta(Field):
'format': '{input!r} cannot be formatted as a timedelta.',
}

def __init__(self, precision='seconds', error=None, **kwargs):
def __init__(self, precision='seconds', **kwargs):
precision = precision.lower()
units = (
self.DAYS,
Expand All @@ -1223,7 +1221,7 @@ def __init__(self, precision='seconds', error=None, **kwargs):
raise ValueError(msg)

self.precision = precision
super().__init__(error=error, **kwargs)
super().__init__(**kwargs)

def _serialize(self, value, attr, obj, **kwargs):
if value is None:
Expand Down

0 comments on commit 5ec6df6

Please sign in to comment.