Skip to content

Commit

Permalink
Remove unneeded Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Loic Teixeira committed Jul 6, 2018
1 parent 1893cf4 commit 6435dd5
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions wagtailmodelchoosers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured

try:
basestring # noqa: F821
except NameError:
# Python 3
def is_list(obj):
return isinstance(obj, collections.Sequence) and not isinstance(obj, (str, bytes))
else:
# Python 2
def is_list(obj):
return isinstance(obj, collections.Sequence) and not isinstance(obj, basestring) # noqa: F821
def is_list(obj):
return isinstance(obj, collections.Sequence) and not isinstance(obj, (str, bytes))


def flatten(list_):
Expand Down

0 comments on commit 6435dd5

Please sign in to comment.