diff options
author | Frederick Muriuki Muriithi | 2021-12-14 13:46:40 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-12-14 13:46:40 +0300 |
commit | 14f70b34235dbf43d68ad72ea74a2020af890072 (patch) | |
tree | d84ca1beafee4a9e68f6a102ad770a910e4ee3ba /gn3 | |
parent | 2aa097404a64260217bb06c131376c98adb8c980 (diff) | |
download | genenetwork3-14f70b34235dbf43d68ad72ea74a2020af890072.tar.gz |
mypy: ignore some imports and errors
* Ignore some missing library stubs
* Ignore some typing errors
* Fix obvious typing errors
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/computations/partial_correlations.py | 9 | ||||
-rw-r--r-- | gn3/db/correlations.py | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index 95eb5e9..91e953a 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -259,8 +259,9 @@ def partial_correlations_fast(# pylint: disable=[R0913, R0914] ## `correlation_type` parameter return len(all_correlations), tuple( corr + ( - (fetched_correlations[corr[0]],) if correlation_type == "literature" - else fetched_correlations[corr[0]][0:2]) + (fetched_correlations[corr[0]],) # type: ignore[index] + if correlation_type == "literature" + else fetched_correlations[corr[0]][0:2]) # type: ignore[index] for idx, corr in enumerate(all_correlations)) def build_data_frame( @@ -372,7 +373,7 @@ def partial_correlations_normal(# pylint: disable=R0913 return tuple(item) + (trait_database[1], trait_database[2]) return item - target_trait_names, target_trait_vals = reduce( + target_trait_names, target_trait_vals = reduce(# type: ignore[var-annotated] lambda acc, item: (acc[0]+(item[0],), acc[1]+(item[data_start_pos:],)), trait_database, (tuple(), tuple())) @@ -425,7 +426,7 @@ def partial_corrs(# pylint: disable=[R0913] data_start_pos, dataset, method) def literature_correlation_by_list( - conn: Any, species: str, trait_list: Tuple[dict]) -> Tuple[dict]: + conn: Any, species: str, trait_list: Tuple[dict]) -> Tuple[dict, ...]: """ This is a migration of the `web.webqtl.correlation.CorrelationPage.getLiteratureCorrelationByList` diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py index 268cfdd..338c0f2 100644 --- a/gn3/db/correlations.py +++ b/gn3/db/correlations.py @@ -422,7 +422,7 @@ def fetch_sample_ids( def build_query_sgo_lit_corr( db_type: str, temp_table: str, sample_id_columns: str, - joins: Tuple[str, ...]) -> str: + joins: Tuple[str, ...]) -> Tuple[str, int]: """ Build query for `SGO Literature Correlation` data, when querying the given `temp_table` temporary table. |