Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Nov 14, 2023
1 parent 4016a64 commit 5043c1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/nplinker/strain_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ def remove(self, strain: Strain):
raise ValueError(f"Strain {strain} not found in strain collection.")

def filter(self, strain_set: set[Strain]):
"""Remove all strains that are not in strain_set from the strain collection."""
"""Remove all strains that are not in strain_set from the strain collection.
Args:
strain_set(set[Strain]): Set of strains to keep.
"""
# note that we need to copy the list of strains, as we are modifying it
for strain in self._strains.copy():
if strain not in strain_set:
Expand Down

0 comments on commit 5043c1f

Please sign in to comment.