about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/register_sys_admin.py2
-rw-r--r--scripts/search_phenotypes.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/register_sys_admin.py b/scripts/register_sys_admin.py
index dfd4d59..06aa845 100644
--- a/scripts/register_sys_admin.py
+++ b/scripts/register_sys_admin.py
@@ -16,7 +16,7 @@ def fetch_email() -> str:
         try:
             user_input = input("Enter the administrator's email: ")
             email = validate_email(user_input.strip(), check_deliverability=True)
-            return email["email"]
+            return email["email"]  # type: ignore
         except EmailNotValidError as _enve:
             print("You did not provide a valid email address. Try again...",
                   file=sys.stderr)
diff --git a/scripts/search_phenotypes.py b/scripts/search_phenotypes.py
index 3bf26dd..eee112d 100644
--- a/scripts/search_phenotypes.py
+++ b/scripts/search_phenotypes.py
@@ -26,7 +26,7 @@ def do_search(
     """Do the search and return the results"""
     search_uri = urljoin(host, (f"search/?page={page}&per_page={per_page}"
                                 f"&type=phenotype&query={query}"))
-    response = requests.get(search_uri)
+    response = requests.get(search_uri, timeout=300)
     results = response.json()
     if len(results) > 0:
         return (item for item in results)
@@ -52,7 +52,7 @@ def update_search_results(redisconn: redis.Redis, redisname: str,
                           results: tuple[dict[str, Any], ...]):
     """Save the results to redis db."""
     key = "search_results"
-    prev_results = tuple(json.loads(redisconn.hget(redisname, key) or "[]"))
+    prev_results = tuple(json.loads(redisconn.hget(redisname, key) or "[]"))  # type: ignore
     redisconn.hset(redisname, key, json.dumps(prev_results + results))
 
 def expire_redis_results(redisconn: redis.Redis, redisname: str):
@@ -75,7 +75,7 @@ def expire_redis_results(redisconn: redis.Redis, redisname: str):
 @click.option(
     "--redis-uri", default="redis://:@localhost:6379/0",
     help="The URI to the redis server.")
-def search(# pylint: disable=[too-many-arguments, too-many-locals]
+def search(# pylint: disable=[too-many-arguments, too-many-positional-arguments, too-many-locals]
         species: str, query: str, job_id: uuid.UUID, host: str, per_page: int,
         selected: str, auth_db_uri: str, gn3_db_uri: str, redis_uri: str):
     """