We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dd17fa commit 71fb556Copy full SHA for 71fb556
sqlparse/sql.py
@@ -418,7 +418,8 @@ def get_type(self):
418
if isinstance(token, (Identifier, IdentifierList)):
419
_, dml_keyword = self.token_next(tidx, skip_ws=True)
420
421
- if dml_keyword.ttype == T.Keyword.DML:
+ if dml_keyword is not None \
422
+ and dml_keyword.ttype == T.Keyword.DML:
423
return dml_keyword.normalized
424
425
# Hmm, probably invalid syntax, so return unknown.
0 commit comments