Skip to content

Commit

Permalink
Removed six dependency (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
MightySCollins authored and auvipy committed Sep 28, 2019
1 parent 18a95a4 commit ed39101
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rest_framework_gis/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from django.contrib.gis.geos import GEOSGeometry, GEOSException
from django.contrib.gis.gdal import GDALException
from django.core.exceptions import ValidationError
from django.utils import six # TODO Remove this along with GeoJsonDict when support for python 2.6/2.7 is dropped.
from django.utils.translation import ugettext_lazy as _
from rest_framework.fields import Field, SerializerMethodField

Expand Down Expand Up @@ -117,7 +116,7 @@ def __init__(self, *args, **kwargs):
If a string is passed attempt to pass it through json.loads,
because it should be a geojson formatted string.
"""
if args and isinstance(args[0], six.string_types):
if args and isinstance(args[0], str):
try:
geojson = json.loads(args[0])
args = (geojson,)
Expand Down

0 comments on commit ed39101

Please sign in to comment.