aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArun Isaac2023-05-31 15:21:30 +0100
committerArun Isaac2023-05-31 15:21:30 +0100
commit082e169ca6676b61935604756c0c7c63e19eeb4a (patch)
treec141d98e4a3965262e6bc22f47c1b8ab6e531abc /scripts
parent7855758c7f17c32cad3c73f5a5677fb87146e32a (diff)
downloadgenenetwork3-082e169ca6676b61935604756c0c7c63e19eeb4a.tar.gz
scripts: Fold long lines.
* scripts/index-genenetwork (write_document, index_query): Fold long lines.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/index-genenetwork6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/index-genenetwork b/scripts/index-genenetwork
index f7d4415..fe2420c 100755
--- a/scripts/index-genenetwork
+++ b/scripts/index-genenetwork
@@ -152,7 +152,8 @@ def locked_xapian_writable_database(path: pathlib.Path) -> xapian.WritableDataba
# pylint: disable=invalid-name
-def write_document(db: xapian.WritableDatabase, identifier: str, doctype: str, doc: xapian.Document) -> None:
+def write_document(db: xapian.WritableDatabase, identifier: str,
+ doctype: str, doc: xapian.Document) -> None:
"""Write document into xapian database."""
# We use the XT and Q prefixes to indicate the type and idterm
# respectively.
@@ -302,7 +303,8 @@ def worker_queue(number_of_workers: int = os.cpu_count() or 1) -> Generator:
process.join()
-def index_query(index_function: Callable, query: SQLQuery, xapian_build_directory: pathlib.Path, sql_uri: str, start: int = 0) -> None:
+def index_query(index_function: Callable, query: SQLQuery,
+ xapian_build_directory: pathlib.Path, sql_uri: str, start: int = 0) -> None:
"""Run SQL query, and index its results for Xapian."""
i = start
try: