Skip to content

Commit

Permalink
revert: Fix Pylance warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Båvenstrand committed Apr 5, 2024
1 parent ac8e500 commit 576af33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mleko/dataset/transform/label_encoder_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _fit(
logger.info(f"Fitting label encoder transformer ({len(self._features)}): {self._features}.")
for feature in self._features:
self._ensure_valid_feature_type(feature, data_schema, dataframe)
labels = get_column(dataframe, feature).unique(dropna=True)
labels: list[str] = get_column(dataframe, feature).unique(dropna=True) # type: ignore
if not self._fit_using_label_dict(feature, labels):
logger.info(f"Assigning mappings for feature {feature!r}: {labels}.")
self._transformer[feature] = {label: i for i, label in enumerate(labels)}
Expand Down

0 comments on commit 576af33

Please sign in to comment.