PabloRMira / sql_formatter

A Python based SQL formatter
https://pablormira.github.io/sql_formatter/
Apache License 2.0
43 stars 10 forks source link

Unbound error in reformat_too_long_line #149

Closed PabloRMira closed 3 years ago

PabloRMira commented 3 years ago

Describe the bug

reformat_too_long_line yields UnboundLocalError for too long lines without either functions or in ()

To Reproduce + Expected behavior

assert_and_print( reformat_too_long_line("select asdf + asdf1 + asdf2 + asdf3 + asdf4 + asdf5 + asdf6 + asdf7 + asdf8 + asdf9"), "select asdf + asdf1 + asdf2 + asdf3 + asdf4 + asdf5 + asdf6 + asdf7 + asdf8 + asdf9" )