Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ieaves committed Feb 2, 2024
1 parent c0c83ba commit 6e0de80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/visions/backends/shared/nan_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ def is_missing(x):
else:
return False


nb.extending.overload(is_missing)(is_missing)


@nb.jit
def hasna(x: np.ndarray) -> bool:
for item in x:
Expand Down
10 changes: 5 additions & 5 deletions src/visions/dtypes/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def coerce_to_array(values, dtype, mask=None, copy=False):
values = np.array(values, dtype=int, copy=copy)

elif not (
is_integer_dtype(values) or is_float_dtype(values) or is_bool_dtype(values)
is_integer_dtype(values) or is_float_dtype(values) or is_bool_dtype(values)
):
raise TypeError(f"{values.dtype} cannot be converted to an IntegerDtype")

Expand Down Expand Up @@ -302,9 +302,9 @@ def dtype(self):

def __init__(self, values, mask, copy=False):
if not (
isinstance(values, np.ndarray)
and is_integer_dtype(values.dtype)
or is_bool_dtype(values.dtype)
isinstance(values, np.ndarray)
and is_integer_dtype(values.dtype)
or is_bool_dtype(values.dtype)
):
raise TypeError(
"values should be integer numpy array. Use "
Expand Down Expand Up @@ -677,7 +677,7 @@ def _maybe_mask_result(self, result, mask, other, op_name):
# a float result
# or our op is a divide
if (is_float_dtype(other) or is_float(other)) or (
op_name in ["rtruediv", "truediv"]
op_name in ["rtruediv", "truediv"]
):
result[mask] = np.nan
return result
Expand Down
2 changes: 1 addition & 1 deletion src/visions/test/series_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from visions.backends.pandas.test_utils import pandas_version

not_pandas_1_0_5 = not (
(pandas_version[0] == 1) and (pandas_version[1] == 0) and (pandas_version[2] == 5)
(pandas_version[0] == 1) and (pandas_version[1] == 0) and (pandas_version[2] == 5)
)


Expand Down

0 comments on commit 6e0de80

Please sign in to comment.