From: Oleg Broytman Date: Mon, 13 Jan 2025 17:34:54 +0000 (+0300) Subject: Feat(print_tokens): Remove duplicate spaces X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=0f3f0c1078da2f099d0f0501b7f9c275083d3d31;p=sqlconvert.git Feat(print_tokens): Remove duplicate spaces Mostly for tests. --- 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(' ', ' ')