Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bobokvsky committed Aug 19, 2024
1 parent 0008bf9 commit 181cf40
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions datapipe/step/batch_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,6 @@ def _apply_filters_to_run_config(
dt = ds.get_table(self.filters)
df = dt.get_data()
filters = cast(List[LabelDict], df[dt.primary_keys].to_dict(orient="records"))
elif isinstance(self.filters, DataTable):
filters = cast(List[LabelDict], self.filters.get_data().to_dict(orient="records"))
elif isinstance(self.filters, pd.DataFrame):
filters = cast(List[LabelDict], self.filters.to_dict(orient="records"))
elif isinstance(self.filters, list) and all([isinstance(x, dict) for x in self.filters]):
Expand Down
2 changes: 1 addition & 1 deletion datapipe/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
TransformResult = Union[DataDF, List[DataDF], Tuple[DataDF, ...]]

LabelDict = Dict[str, Any]
Filters = Union[str, "DataTable", IndexDF, List[LabelDict], Callable[..., List[LabelDict]], Callable[..., IndexDF]]
Filters = Union[str, IndexDF, List[LabelDict], Callable[..., List[LabelDict]], Callable[..., IndexDF]]
try:
from sqlalchemy.orm import DeclarativeBase

Expand Down

0 comments on commit 181cf40

Please sign in to comment.