Skip to content

Commit 7808459

Browse files
committed
Fix linting errors
1 parent d5ed8a6 commit 7808459

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

py-forust/forust/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def _is_pandas_series(obj: object) -> bool:
4141
except Exception:
4242
return False
4343

44+
4445
CONTRIBUTION_METHODS = {
4546
"weight": "Weight",
4647
"Weight": "Weight",
@@ -274,8 +275,8 @@ def _convert_input_frame(X: FrameLike) -> tuple[list[str], np.ndarray, int, int]
274275
tuple[list[str], np.ndarray, int, int, ]: Return column names, the flat data, number of rows, and the number of columns
275276
"""
276277
if _is_pandas_dataframe(X):
277-
X_ = X.to_numpy() # type: ignore
278-
features_ = X.columns.to_list() # type: ignore
278+
X_ = X.to_numpy() # type: ignore
279+
features_ = X.columns.to_list() # type: ignore
279280
else:
280281
# Assume it's a numpy array.
281282
X_ = X
@@ -289,7 +290,7 @@ def _convert_input_frame(X: FrameLike) -> tuple[list[str], np.ndarray, int, int]
289290

290291
def _convert_input_array(x: ArrayLike) -> np.ndarray:
291292
if _is_pandas_series(x):
292-
x_ = x.to_numpy() # type: ignore
293+
x_ = x.to_numpy() # type: ignore
293294
else:
294295
x_ = x
295296
if not np.issubdtype(x_.dtype, "float64"):

py-forust/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cache-keys = [{file = "pyproject.toml"}, {file = "rust/Cargo.toml"}, {file = "**
4343
# Uncomment to build rust code in development mode
4444
# config-settings = { build-args = '--profile=dev' }
4545

46-
[tool.ruff]
46+
[tool.ruff.lint]
4747
# Never enforce `E501` (line length violations).
4848
ignore = ["E501"]
4949

0 commit comments

Comments
 (0)