summaryrefslogtreecommitdiff
path: root/sqlparse/lexer.py
diff options
context:
space:
mode:
authorSimon Heisterkamp <simon@heisterkamp.dk>2022-11-30 15:00:03 +0000
committerAndi Albrecht <albrecht.andi@gmail.com>2023-01-02 08:54:47 +0100
commit8515d2edd70fc16d69aa7b1094f9b3534dfa74d9 (patch)
tree867c9b95562c24796c63089cbf846247f87f02e5 /sqlparse/lexer.py
parente37eaea4a78cbb335070ffec018bfc28425aa1a4 (diff)
downloadsqlparse-8515d2edd70fc16d69aa7b1094f9b3534dfa74d9.tar.gz
remove type annotations for python 3.5 compatibility
Diffstat (limited to 'sqlparse/lexer.py')
-rw-r--r--sqlparse/lexer.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py
index 61c52a9..7408e01 100644
--- a/sqlparse/lexer.py
+++ b/sqlparse/lexer.py
@@ -13,7 +13,6 @@
# and to allow some customizations.
from io import TextIOBase
-from typing import List
from sqlparse import tokens, keywords
from sqlparse.utils import consume
@@ -34,9 +33,6 @@ class Lexer(metaclass=_LexerSingletonMetaclass):
"""The Lexer supports configurable syntax.
To add support for additional keywords, use the `add_keywords` method."""
- _SQL_REGEX: keywords.SQL_REGEX_TYPE
- _keywords: List[keywords.KEYWORDS_TYPE]
-
def default_initialization(self):
"""Initialize the lexer with default dictionaries.
Useful if you need to revert custom syntax settings."""
@@ -58,11 +54,11 @@ class Lexer(metaclass=_LexerSingletonMetaclass):
self._SQL_REGEX = []
self._keywords = []
- def set_SQL_REGEX(self, SQL_REGEX: keywords.SQL_REGEX_TYPE):
+ def set_SQL_REGEX(self, SQL_REGEX):
"""Set the list of regex that will parse the SQL."""
self._SQL_REGEX = SQL_REGEX
- def add_keywords(self, keywords: keywords.KEYWORDS_TYPE):
+ def add_keywords(self, keywords):
"""Add keyword dictionaries. Keywords are looked up in the same order
that dictionaries were added."""
self._keywords.append(keywords)