From b97387ceab38ea724cb715f8a43050b1693d1d36 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Tue, 5 Mar 2024 07:29:30 +0100 Subject: [PATCH] Update changelog and code cleanup. --- AUTHORS | 1 + CHANGELOG | 1 + sqlparse/sql.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 2427bfb3..934bbe33 100644 --- a/AUTHORS +++ b/AUTHORS @@ -35,6 +35,7 @@ Alphabetical list of contributors: * Hugo van Kemenade * hurcy * Ian Robertson +* Igor Khrol * JacekPliszka * JavierPan * Jean-Martin Archer diff --git a/CHANGELOG b/CHANGELOG index 0b48e9f3..cbfbcf25 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ Enhancements: * Splitting statements now allows to remove the semicolon at the end. Some database backends love statements without semicolon (issue742). +* Support TypedLiterals in get_parameters (pr649, by Khrol). Bug Fixes diff --git a/sqlparse/sql.py b/sqlparse/sql.py index f93d7c36..41606dd8 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -623,7 +623,8 @@ def get_parameters(self): for token in parenthesis.tokens: if isinstance(token, IdentifierList): return token.get_identifiers() - elif imt(token, i=(Function, Identifier, TypedLiteral), t=T.Literal): + elif imt(token, i=(Function, Identifier, TypedLiteral), + t=T.Literal): result.append(token) return result