Skip to content

Commit

Permalink
Remove duplicate imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Oct 26, 2014
1 parent 7c6d14a commit 95287c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ Vagrantfile
*.ai
.konchrc
_sandbox
pylintrc
2 changes: 1 addition & 1 deletion marshmallow/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ def __init__(self, choices, default=None, attribute=None, error=None, **kwargs):
self.choices = choices
return super(Select, self).__init__(default, attribute, error, **kwargs)

def _validated(self, value, exception_class, *args, **kwargs):
def _validated(self, value, exception_class):
if value not in self.choices:
raise exception_class(
"{0!r} is not a valid choice for this field.".format(value)
Expand Down
5 changes: 2 additions & 3 deletions marshmallow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
from __future__ import absolute_import

import datetime
from decimal import Decimal as MyDecimal, ROUND_HALF_EVEN
from decimal import Decimal, ROUND_HALF_EVEN, Context, Inexact
import functools
import inspect
import json
import time
import types
from calendar import timegm
from decimal import Decimal, Context, Inexact
from email.utils import formatdate, parsedate
from pprint import pprint as py_pprint

Expand Down Expand Up @@ -73,7 +72,7 @@ def float_to_decimal(f):
result = ctx.divide(numerator, denominator)
return result

ZERO_DECIMAL = MyDecimal()
ZERO_DECIMAL = Decimal()

def decimal_to_fixed(value, precision):
"""Convert a `Decimal` to a fixed-precision number as a string."""
Expand Down

0 comments on commit 95287c7

Please sign in to comment.