clean formatting
This commit is contained in:
10
lib/books.py
10
lib/books.py
@@ -36,7 +36,8 @@ class Book:
|
||||
|
||||
self.sections = []
|
||||
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():
|
||||
self.sections.append(query.value("contents"))
|
||||
@@ -95,7 +96,8 @@ class Book:
|
||||
uuid = self.metadata["identifier"]
|
||||
query = QSqlQuery()
|
||||
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)
|
||||
if not query.exec():
|
||||
@@ -137,7 +139,9 @@ class Book:
|
||||
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
|
||||
while node:
|
||||
elm = cast(xml.dom.minidom.Element, node)
|
||||
|
||||
Reference in New Issue
Block a user