1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
--- a/parse_type/cardinality_field.py
+++ b/parse_type/cardinality_field.py
@@ -8,8 +8,6 @@
"{persons:Person+}" #< Cardinality: 1..* = one or more = many
"""
-from __future__ import absolute_import
-import six
from parse_type.cardinality import Cardinality, TypeBuilder
@@ -115,7 +113,7 @@
:raises: ValueError, if type_name does not end with CardinalityField
:raises: MissingTypeError, if type_converter is missing in type_dict
"""
- assert isinstance(type_name, six.string_types)
+ assert isinstance(type_name, str)
if not CardinalityField.matches_type(type_name):
message = "type_name='%s' has no CardinalityField" % type_name
raise ValueError(message)
--- a/parse_type/parse_util.py
+++ b/parse_type/parse_util.py
@@ -4,10 +4,8 @@
Provides generic utility classes for the :class:`parse.Parser` class.
"""
-from __future__ import absolute_import
from collections import namedtuple
import parse
-import six
# -- HELPER-CLASS: For format part in a Field.
@@ -66,7 +64,7 @@
format1 = self.format or ""
format2 = other.format or ""
return (self.name == other.name) and (format1 == format2)
- elif isinstance(other, six.string_types):
+ elif isinstance(other, str):
return str(self) == other
else:
raise ValueError(other)
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -52,7 +52,6 @@
"parse >= 1.18.0; python_version >= '3.0'",
"parse >= 1.13.1; python_version <= '2.7'",
"enum34; python_version < '3.4'",
- "six >= 1.15",
]
--- a/setup.py
+++ b/setup.py
@@ -101,7 +101,6 @@
"parse >= 1.18.0; python_version >= '3.0'",
"parse >= 1.13.1; python_version <= '2.7'",
"enum34; python_version < '3.4'",
- "six >= 1.15",
],
tests_require=[
"pytest < 5.0; python_version < '3.0'", # >= 4.2
|