Skip to content

Commit

Permalink
Fix pylint warnings and add typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
fplazaonate committed Aug 22, 2024
1 parent af20bf7 commit 0da7851
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crocodeel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import os
# Disable implicit parallelism in numpy
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["OMP_NUM_THREADS"] = "1"
2 changes: 1 addition & 1 deletion crocodeel/conta_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def write_tsv(conta_events: list[ContaminationEvent], fh: TextIO) -> None:
),
file=fh,
)

logging.info(
"Contamination events saved in %s",
Path(fh.name).resolve(),
Expand Down
4 changes: 2 additions & 2 deletions crocodeel/search_conta.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, species_ab_table, rf_classifier):
self.species_ab_table = species_ab_table
self.rf_classifier = rf_classifier

def classify_sample_pair(self, sample_pair):
def classify_sample_pair(self, sample_pair) -> ContaminationEvent:
source, target = sample_pair

if source == target:
Expand Down Expand Up @@ -128,7 +128,7 @@ def __init__(
self.num_sample_pairs = num_sample_pairs
self.nproc = nproc

def search_contamination(self):
def search_contamination(self) -> list[ContaminationEvent]:
rf_classifier = RandomForestModel.load()
worker = ContaminationSearcherWorker(self.species_ab_table, rf_classifier)

Expand Down

0 comments on commit 0da7851

Please sign in to comment.