Skip to content

Commit

Permalink
Pre-silence Pyre Errors for upcoming upgrade] [batch:73/596] [shard:2/N]
Browse files Browse the repository at this point in the history
Reviewed By: MaggieMoss

Differential Revision: D65218348

fbshipit-source-id: b31e9f332a1a86a721e66f3b34a551ef8c9d1faf
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Oct 31, 2024
1 parent 165099b commit 010f955
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kats/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,9 @@ def __len__(self) -> int:
return len(self.value)

def __getitem__(
self, sliced: Union[str, Iterable, builtins.slice]
# pyre-fixme[24]: Generic type `slice` expects 3 type parameters.
self,
sliced: Union[str, Iterable, builtins.slice],
) -> TimeSeriesData:
if isinstance(sliced, str) or (
isinstance(sliced, Iterable) and all(isinstance(s, str) for s in sliced)
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/bocpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ class _BayesOnlineChangePoint(Detector):
T: int
P: int
data_values: npt.NDArray
# pyre-fixme[24]: Generic type `slice` expects 3 type parameters.
_ts_slice: Union[int, slice]
_ts_names: Sequence[str]
_posterior_shape: Tuple[int, int, int]
Expand All @@ -755,6 +756,7 @@ def __init__(
# the same calculation throughout with fewer additional checks
# for univariate and bivariate data.
if not data.is_univariate():
# pyre-fixme[4]: Attribute annotation cannot contain `Any`.
self._ts_slice = slice(None)
self.P = data.value.shape[1] # Number of time series
self._ts_names = list(self.data.value.columns)
Expand Down

0 comments on commit 010f955

Please sign in to comment.