clean formatting

This commit is contained in:
Christopher T. Johnson
2023-11-17 11:03:01 -05:00
parent aa86f5b020
commit 21cdcbf91a

View File

@@ -36,7 +36,8 @@ class Book:
self.sections = [] self.sections = []
query.prepare( query.prepare(
"SELECT * FORM sections WHERE book_id = :book_id " "ORDER BY sequence" "SELECT * FORM sections WHERE book_id = :book_id "
"ORDER BY sequence"
) )
while query.next(): while query.next():
self.sections.append(query.value("contents")) self.sections.append(query.value("contents"))
@@ -95,7 +96,8 @@ class Book:
uuid = self.metadata["identifier"] uuid = self.metadata["identifier"]
query = QSqlQuery() query = QSqlQuery()
query.prepare( query.prepare(
"SELECT COUNT(*) AS number, book_id FROM books b " "WHERE b.uuid = :uuid" "SELECT COUNT(*) AS number, book_id FROM books b "
"WHERE b.uuid = :uuid"
) )
query.bindValue(":uuid", uuid) query.bindValue(":uuid", uuid)
if not query.exec(): if not query.exec():
@@ -137,7 +139,9 @@ class Book:
newdom.createTextNode(cast(xml.dom.minidom.Text, elm).data), newdom.createTextNode(cast(xml.dom.minidom.Text, elm).data),
) )
newelm: xml.dom.minidom.Element = newdom.createElement(elm.localName) newelm: xml.dom.minidom.Element = newdom.createElement(
elm.localName
)
node = elm.firstChild node = elm.firstChild
while node: while node:
elm = cast(xml.dom.minidom.Element, node) elm = cast(xml.dom.minidom.Element, node)