diff options
author | Frederick Muriuki Muriithi | 2022-03-11 12:09:22 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-03-11 12:09:22 +0300 |
commit | 08a27b65b91cec12ec2a44945090ca8b9fabd8dd (patch) | |
tree | 8c56e52ed54eac07b6e490b7c1693baa21183837 | |
parent | 9691e225724e041997c74f8665dcbfa12bb1c579 (diff) | |
download | genenetwork3-08a27b65b91cec12ec2a44945090ca8b9fabd8dd.tar.gz |
Fix typing errors
-rw-r--r-- | gn3/computations/partial_correlations.py | 2 | ||||
-rw-r--r-- | gn3/db/genotypes.py | 4 | ||||
-rw-r--r-- | mypy.ini | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index 1a37838..5017796 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -60,7 +60,7 @@ def control_samples(controls: Sequence[dict], sampleslist: Sequence[str]): __process_sample__, sampleslist, (tuple(), tuple(), tuple())) return reduce( - lambda acc, item: ( + lambda acc, item: (# type: ignore[arg-type, return-value] acc[0] + (item[0],), acc[1] + (item[1],), acc[2] + (item[2],), diff --git a/gn3/db/genotypes.py b/gn3/db/genotypes.py index 0e19a5f..6f867c7 100644 --- a/gn3/db/genotypes.py +++ b/gn3/db/genotypes.py @@ -50,8 +50,8 @@ def __load_genotype_samples_from_geno(genotype_filename: str): gzipped_filename = f"{genotype_filename}.gz" if os.path.isfile(gzipped_filename): - with gzip.open(gzipped_filename) as genofile: - rows = __remove_comments_and_empty_lines__(genofile.readlines()) + with gzip.open(gzipped_filename) as gz_genofile: + rows = __remove_comments_and_empty_lines__(gz_genofile.readlines()) else: with open(genotype_filename, encoding="utf8") as genofile: rows = __remove_comments_and_empty_lines__(genofile.readlines()) @@ -31,4 +31,7 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-pandas.*] +ignore_missing_imports = True + +[mypy-pytest.*] ignore_missing_imports = True
\ No newline at end of file |