diff options
author | Arun Isaac | 2021-12-23 13:57:04 +0530 |
---|---|---|
committer | Arun Isaac | 2021-12-23 13:57:04 +0530 |
commit | 36cc8b1f837406d7002246c00d6054573687c472 (patch) | |
tree | 272a81727d5796a13b56f862b34d35f821c072e0 /gn3/db/datasets.py | |
parent | deca94c7b473ec79c5e5cee3d6caeb3c3885bd74 (diff) | |
download | genenetwork3-36cc8b1f837406d7002246c00d6054573687c472.tar.gz |
db: Fix sparql_query return type.
* gn3/db/datasets.py: Import List from typing.
(sparql_query): Set return type to List[Dict[str, Any]].
Diffstat (limited to 'gn3/db/datasets.py')
-rw-r--r-- | gn3/db/datasets.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py index 788e9cf..ca48156 100644 --- a/gn3/db/datasets.py +++ b/gn3/db/datasets.py @@ -3,7 +3,7 @@ This module contains functions relating to specific trait dataset manipulation """ import re from string import Template -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from SPARQLWrapper import JSON, SPARQLWrapper from gn3.settings import SPARQL_ENDPOINT @@ -297,7 +297,7 @@ def retrieve_trait_dataset(trait_type, trait, threshold, conn): **group } -def sparql_query(query: str) -> Dict[str, Any]: +def sparql_query(query: str) -> List[Dict[str, Any]]: """Run a SPARQL query and return the bound variables.""" sparql = SPARQLWrapper(SPARQL_ENDPOINT) sparql.setQuery(query) |