Skip to content

Commit

Permalink
Refactor: simplify list comprehension in hint parser
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas committed Jun 12, 2023
1 parent a4934cb commit 46abf16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sqlglot/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3101,8 +3101,7 @@ def hint(self, *hints: ExpOrStr, dialect: DialectType = None, copy: bool = True)
"""
inst = _maybe_copy(self, copy)
inst.set(
"hint",
Hint(expressions=[maybe_parse(h, copy=copy, dialect=dialect) for h in hints if h]),
"hint", Hint(expressions=[maybe_parse(h, copy=copy, dialect=dialect) for h in hints])
)

return inst
Expand Down

0 comments on commit 46abf16

Please sign in to comment.