diff options
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/compat.py | 2 | ||||
| -rw-r--r-- | sqlparse/lexer.py | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sqlparse/compat.py b/sqlparse/compat.py index 4ca79a2..d2214be 100644 --- a/sqlparse/compat.py +++ b/sqlparse/compat.py @@ -27,7 +27,6 @@ if PY3: def unicode_compatible(cls): return cls - bytes_type = bytes text_type = str string_types = (str,) from io import StringIO @@ -40,7 +39,6 @@ elif PY2: cls.__str__ = lambda x: x.__unicode__().encode('utf-8') return cls - bytes_type = str text_type = unicode string_types = (str, unicode,) from StringIO import StringIO diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 66e0689..fd007a4 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -15,7 +15,7 @@ from sqlparse import tokens from sqlparse.keywords import SQL_REGEX -from sqlparse.compat import bytes_type, text_type, file_types +from sqlparse.compat import text_type, file_types from sqlparse.utils import consume @@ -43,7 +43,7 @@ class Lexer(object): if isinstance(text, text_type): pass - elif isinstance(text, bytes_type): + elif isinstance(text, bytes): if encoding: text = text.decode(encoding) else: |
