Broken formatting for injected SQL snippet within python

已回答

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.

 

0

It seems to be related to the existing bug DBE-21343. Please use the suggested workaround:

Set the "CREATE TABLE" formatting options (DDL tab) to the following:

0

请先登录再写评论。