Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

Commit 80a4312

Browse files
committed
[requirements] Stop using six compatibility library
Improves e5ee369
1 parent e5ee369 commit 80a4312

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

django_netjsongraph/api/parsers.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import six
21
from django.conf import settings
32
from django.core.exceptions import ValidationError
43
from rest_framework.exceptions import ParseError
@@ -18,4 +17,4 @@ def parse(self, stream, media_type=None, parser_context=None):
1817
try:
1918
return stream.read().decode(encoding)
2019
except ValidationError as e: # pragma: nocover
21-
raise ParseError('text/plain parse error - %s' % six.text_type(e))
20+
raise ParseError('text/plain parse error - %s' % str(e))

django_netjsongraph/tests/base/test_link.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import six
21
from django.core.exceptions import ValidationError
32

43
from ...utils import link_status_changed
@@ -54,7 +53,7 @@ def test_json(self):
5453
'status_changed': link.status_changed,
5554
}
5655
})
57-
self.assertIsInstance(link.json(), six.string_types)
56+
self.assertIsInstance(link.json(), str)
5857

5958
def test_get_from_nodes(self):
6059
t = self.topology_model.objects.first()

django_netjsongraph/tests/base/test_node.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import six
2-
3-
41
class TestNodeMixin(object):
52
def test_str(self):
63
n = self.node_model(addresses=['192.168.0.1'], label='test node')
@@ -62,7 +59,7 @@ def test_json(self):
6259
'modified': n.modified
6360
}
6461
})
65-
self.assertIsInstance(n.json(), six.string_types)
62+
self.assertIsInstance(n.json(), str)
6663

6764
def test_get_from_address(self):
6865
t = self.topology_model.objects.first()

django_netjsongraph/tests/base/test_topology.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from datetime import timedelta
22

33
import responses
4-
import six
54
from django.core.exceptions import ValidationError
65
from freezegun import freeze_time
76
from netdiff import OlsrParser
@@ -80,7 +79,7 @@ def test_json(self):
8079
dict(l2.json(dict=True))
8180
]
8281
})
83-
self.assertIsInstance(t.json(), six.string_types)
82+
self.assertIsInstance(t.json(), str)
8483

8584
@responses.activate
8685
def test_empty_diff(self):

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
universal=1
33

44
[isort]
5-
known_third_party = six,django,netdiff
5+
known_third_party = django,netdiff
66
default_section = THIRDPARTY
77

88
[flake8]

0 commit comments

Comments
 (0)