В первую очередь это аргумент и в pep8 все довольно ясно прописано:
The closing brace/bracket/parenthesis on multiline constructs may either line up under the first non-whitespace character of the last line of list, as in:
or it may be lined up under the first character of the line that starts the multiline construct, as in:
В документации Python используется
первый вариант.
Но и второй вариант более чем допустим:
cursor.execute("""
CREATE TABLE IF NOT EXISTS Users
(ID INTEGER NOT NULL PRIMARY KEY,
Text TEXT, Configuration Text)
""")
P.S. Лично мне гораздо удобнее избегать в аргументах формирование строк, так что я всегда делаю так:
query = (
'CREATE TABLE IF NOT EXISTS Users('
'ID INTEGER NOT NULL PRIMARY KEY,'
'Text TEXT,'
'Configuration Text)'
)
cursor.execute(query)
В целом довольно часто встречаю подобный подход.