Skip to content

Commit

Permalink
Back out some incorrect changes, ignore lint rule E721
Browse files Browse the repository at this point in the history
  • Loading branch information
eccabay committed Jul 5, 2024
1 parent 49d6704 commit 0325f07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def fit(self, X, y=None):
return self

X = X[self._cols_to_impute]
if (X.dtypes is bool).all():
if (X.dtypes == bool).all():
# Ensure that _component_obj still gets fit so that if any of the dtypes are different
# at transform, we've fit the component. This is needed because sklearn doesn't allow
# data with only bool dtype to be passed in.
Expand All @@ -119,7 +119,7 @@ def transform(self, X, y=None):

# separate out just the columns we are imputing
X_t = X[self._cols_to_impute]
if not self._cols_to_impute or (X_t.dtypes is bool).all():
if not self._cols_to_impute or (X_t.dtypes == bool).all():
# If there are no columns to impute or all columns to impute are bool dtype,
# which will never have null values, return the original data without any fully null columns
not_all_null_cols = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def fit(self, X, y):
y = y.to_frame()

# Return early if all the columns are bool dtype, which will never have null values
if (y.dtypes is bool).all():
if (y.dtypes == bool).all():
return y

self._component_obj.fit(y)
Expand All @@ -119,7 +119,7 @@ def transform(self, X, y):
y_df = y_ww.ww.to_frame()

# Return early if all the columns are bool dtype, which will never have null values
if (y_df.dtypes is bool).all():
if (y_df.dtypes == bool).all():
return X, y_ww

transformed = self._component_obj.transform(y_df)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ lint.select = [
# isort
"I001"
]
lint.ignore = ["E501", "D107", "D401"]
lint.ignore = ["E501", "D107", "D401", "E721"]
src = ["evalml"]

[tool.ruff.lint.per-file-ignores]
Expand Down

0 comments on commit 0325f07

Please sign in to comment.