From f9a73a62cfc23b10c38f22a10bd1d4c3edbb286f Mon Sep 17 00:00:00 2001 From: Simon Heisterkamp Date: Wed, 30 Nov 2022 22:34:52 +0000 Subject: test for changing the regex --- sqlparse/lexer.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sqlparse') diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 7408e01..aafb55f 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -99,14 +99,12 @@ class Lexer(metaclass=_LexerSingletonMetaclass): text = text.decode(encoding) else: try: - text = text.decode("utf-8") + text = text.decode('utf-8') except UnicodeDecodeError: - text = text.decode("unicode-escape") + text = text.decode('unicode-escape') else: - raise TypeError( - "Expected text or file-like object, got {!r}" - .format(type(text)) - ) + raise TypeError("Expected text or file-like object, got {!r}". + format(type(text))) iterable = enumerate(text) for pos, char in iterable: -- cgit v1.2.1