Skip to content

Commit

Permalink
Make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
vankesteren committed Feb 23, 2024
1 parent 9bbdac6 commit 9cb7e89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions metasyncontrib/disclosure/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class DisclosureUniqueKey(UniqueKeyDistribution):
@classmethod
def _fit(cls, values: pl.Series, n_avg: int = 11):
orig_dist = super()._fit(values)
if orig_dist.consecutive == 1:
return cls(0, 1)
if orig_dist.consecutive:
return cls(0, True)
sub_values = micro_aggregate(values, n_avg)
return super()._fit(sub_values)

Expand Down
3 changes: 1 addition & 2 deletions metasyncontrib/disclosure/numerical.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class DisclosureNumerical(BaseDistribution):
"""Class for numerical distributions of the disclosure kind."""

@classmethod
def fit(cls, series: Union[Sequence, pl.Series], *args,
n_avg: int = 11, **kwargs) -> BaseDistribution:
def fit(cls, series, *args, n_avg: int = 11, **kwargs) -> BaseDistribution:
pl_series = cls._to_series(series)
sub_series = micro_aggregate(pl_series, n_avg)
return cls._fit(sub_series, *args, **kwargs)

0 comments on commit 9cb7e89

Please sign in to comment.