Skip to content

Commit

Permalink
Use type:ignore as last resort
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedk committed Sep 2, 2024
1 parent b236c86 commit 459abcf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pydvl/valuation/samplers/powerset.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,10 @@ def __init__(

def _generate(self, indices: IndexSetT) -> SampleGenerator:
for idx in self.index_iterator(indices):
for subset in powerset(
for subset in powerset( # type:ignore
complement(indices, [idx] if idx is not None else [])
):
typed_subset: Collection[IndexT] = subset
yield Sample(idx, np.asarray(typed_subset, dtype=indices.dtype))
yield Sample(idx, np.asarray(subset, dtype=indices.dtype))

def sample_limit(self, indices: IndexSetT) -> int | None:
len_outer = self._index_iteration.length(indices)
Expand Down

0 comments on commit 459abcf

Please sign in to comment.