Broken formatting for injected SQL snippet within python
Answered
How can I change/fix the python code formatting for a SQL snippet within a multi line string?
See the attached image: Above (1) is the code before applying code formatting and (2) is the result after the code formatting. I'm using the default settings for SQL (SQLite) and Python. Placing the SQL code into a separate .sql file works fine, but I would like to keep some SQL snippets in a multiline string in python.

Please sign in to leave a comment.
It seems to be related to the existing bug DBE-21343. Please use the suggested workaround: