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 six dependency #197

Merged
merged 1 commit into from
Sep 28, 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
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