From a9fc8511f7cf868223a07d268fadbdd9ad846e57 Mon Sep 17 00:00:00 2001 From: Florian Plaza Onate Date: Wed, 3 Apr 2024 11:29:44 +0000 Subject: [PATCH] Fix mypy warnings --- meteor/merging.py | 2 +- meteor/meteor.py | 2 +- meteor/profiler.py | 2 +- meteor/tests/test_counter.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meteor/merging.py b/meteor/merging.py index 6d7ae80..c0c9d4c 100644 --- a/meteor/merging.py +++ b/meteor/merging.py @@ -41,7 +41,7 @@ class Merging(Session): min_msp_occurrence: int remove_sample_with_no_msp: bool output_mpa: bool - mpa_taxonomic_level: str + mpa_taxonomic_level: str|None output_biom: bool output_gene_matrix: bool ranks: dict[str, str] = field( diff --git a/meteor/meteor.py b/meteor/meteor.py index 80c90da..f05afab 100644 --- a/meteor/meteor.py +++ b/meteor/meteor.py @@ -783,7 +783,7 @@ def main() -> None: # pragma: no cover args.min_msp_occurrence, args.remove_sample_with_no_msp, False, - "a", + None, #args.output_mpa, #args.taxonomic_level, args.output_biom, diff --git a/meteor/profiler.py b/meteor/profiler.py index 74daea4..057a0e5 100644 --- a/meteor/profiler.py +++ b/meteor/profiler.py @@ -43,7 +43,7 @@ class Profiler(Session): meteor: type[Component] rarefaction_level: int seed: int - normalization: str + normalization: str|None core_size: int msp_filter: float completeness: float diff --git a/meteor/tests/test_counter.py b/meteor/tests/test_counter.py index 34b5832..f128f5c 100644 --- a/meteor/tests/test_counter.py +++ b/meteor/tests/test_counter.py @@ -284,8 +284,8 @@ def test_save_cram(counter_unique: Counter, datadir: Path, tmp_path: Path) -> No reads, _ = counter_unique.filter_alignments( cramdesc ) # pylint: disable=unused-variable - read_list = list(chain(reads.values())) - merged_list = list(chain.from_iterable(read_list)) + read_list = reads.values() + merged_list = chain.from_iterable(read_list) tmpcramfile = tmp_path / "test" counter_unique.save_cram_strain(tmpcramfile, cramdesc, merged_list, ref_json) assert tmpcramfile.exists()