Skip to content

Commit

Permalink
chore: only set vars with necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Mar 28, 2024
1 parent bf94ce3 commit 647611e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sqlglot/generator.py
Expand Up @@ -3228,8 +3228,11 @@ def expressions(
num_sqls = len(expressions)

# These are calculated once in case we have the leading_comma / pretty option set, correspondingly
pad = " " * len(sep)
stripped_sep = sep.strip()
if self.pretty:
if self.leading_comma:
pad = " " * len(sep)
else:
stripped_sep = sep.strip()

result_sqls = []
for i, e in enumerate(expressions):
Expand Down

0 comments on commit 647611e

Please sign in to comment.