Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unused error argument #1209

Merged
merged 1 commit into from
May 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
removed unused error argument
  • Loading branch information
rooterkyberian committed May 6, 2019
commit 1058eb72aa44f35b8611f65b88a5b6c21202dc64
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