Skip to content

Commit

Permalink
Import ABCs from collections.abc. Fixes #27.
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Jan 14, 2019
1 parent 0690712 commit e9ffeb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions ensure/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class NumericStringType(type):
_type = str
_cast = float

def __instancecheck__(self, other):
try:
if not isinstance(other, self._type):
Expand Down
5 changes: 2 additions & 3 deletions ensure/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import sys
import collections
import types
import re
import functools
from unittest.case import TestCase
from collections import namedtuple, Mapping, Iterable
from collections.abc import Mapping, Iterable

from six import string_types

from ._types import NumericString, NumericByteString, IntegerString, IntegerByteString
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
universal=1
[flake8]
max-line-length=120
ignore: E301, E302, E401, E226, F841, F401
ignore: E302, E401, F401

0 comments on commit e9ffeb0

Please sign in to comment.