Skip to content

Commit

Permalink
Improve readability of Collection._find.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Aug 17, 2021
1 parent 12fb8a7 commit a2cbd21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signac/contrib/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,9 +936,9 @@ def _find(self, filter=None, limit=0):
if not _valid_filter(filter):
raise ValueError(filter)
result = self._find_result(filter)
return set(islice(result, limit if limit else None))
else:
return set(islice(self._docs.keys(), limit if limit else None))
result = self._docs.keys()
return set(islice(result, limit if limit else None))

def find(self, filter=None, limit=0):
"""Find all documents matching filter, but not more than limit.
Expand Down

0 comments on commit a2cbd21

Please sign in to comment.