diff options
author | Muriithi Frederick Muriuki | 2021-08-04 11:30:44 +0300 |
---|---|---|
committer | Muriithi Frederick Muriuki | 2021-08-04 11:30:44 +0300 |
commit | f712da630c1a3642cb44b62c4b2b857373cd78d7 (patch) | |
tree | 55417c63e2955522769f302c269411b7a2cd5afa /gn3 | |
parent | 0d7ebb87e2995207f23bc8b8e05e64aaab50b48d (diff) | |
download | genenetwork3-f712da630c1a3642cb44b62c4b2b857373cd78d7.tar.gz |
Fix issues caught by pylint
* gn3/computations/slink.py: remove unused imports
* gn3/db/traits.py: remove unnecessary `else` clauses
* tests/unit/db/test_traits.py: add docstrings for functions
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/computations/slink.py | 2 | ||||
-rw-r--r-- | gn3/db/traits.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gn3/computations/slink.py b/gn3/computations/slink.py index 23d3d88..5953e6b 100644 --- a/gn3/computations/slink.py +++ b/gn3/computations/slink.py @@ -7,7 +7,7 @@ slink: TODO: Describe what the function does... """ import logging -from typing import List, Tuple, Union, Sequence +from typing import Union, Sequence NumType = Union[int, float] SeqOfNums = Sequence[NumType] diff --git a/gn3/db/traits.py b/gn3/db/traits.py index ea35d7e..29c91a6 100644 --- a/gn3/db/traits.py +++ b/gn3/db/traits.py @@ -166,8 +166,7 @@ def set_confidential_field(trait_info): "confidential": 1 if ( trait_info.get("pre_publication_description", None) and not trait_info.get("pubmed_id", None)) else 0} - else: - return trait_info + return trait_info def retrieve_probeset_trait_info(trait_data_source: Dict[str, Any], conn: Any): """Retrieve trait information for type `ProbeSet` traits. @@ -344,13 +343,14 @@ def set_riset_fields(trait_info, conn): def retrieve_trait_info( trait_type: str, trait_name: str, trait_dataset_id: int, - trait_dataset_name: str, conn: Any, QTL=None): + trait_dataset_name: str, conn: Any, qtl=None): """Retrieves the trait information. https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlTrait.py#L397-L456 This function, or the dependent functions, might be incomplete as they are currently.""" + # pylint: disable=[R0913] trait_info_function_table = { "Publish": retrieve_publish_trait_info, "ProbeSet": retrieve_probeset_trait_info, |