From 0f3f0c1078da2f099d0f0501b7f9c275083d3d31 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 20:34:54 +0300 Subject: [PATCH] Feat(print_tokens): Remove duplicate spaces Mostly for tests. --- sqlconvert/print_tokens.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqlconvert/print_tokens.py b/sqlconvert/print_tokens.py index 6aa6fb4..65441b9 100644 --- a/sqlconvert/print_tokens.py +++ b/sqlconvert/print_tokens.py @@ -18,4 +18,6 @@ def print_tokens(token_list, outfile=sys.stdout, encoding=None): def tlist2str(token_list): - return u''.join(token.normalized for token in token_list.flatten()) + return u''.join( + token.normalized for token in token_list.flatten() + ).replace(' ', ' ') -- 2.39.5