Skip to content

Commit 5a40360

Browse files
Satish KumarSatish Kumar
authored andcommitted
Fix flake errors
1 parent 91c8114 commit 5a40360

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

streamz/dataframe/tests/test_dataframe_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ def test_utils_get_base_frame_type_cudf():
5656
get_base_frame_type("DataFrame", is_dataframe_like, df.index)
5757
with pytest.raises(TypeError):
5858
get_base_frame_type("Series", is_series_like, df.index)
59-
assert issubclass(get_base_frame_type("Index", is_index_like, df.index), cudf.Index)
59+
assert issubclass(get_base_frame_type("Index", is_index_like, df.index), cudf.Index)

streamz/dataframe/utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ def is_dataframe_like(df):
22
""" Looks like a Pandas DataFrame. ** Borrowed from dask.dataframe.utils ** """
33
typ = type(df)
44
return (all(hasattr(typ, name)
5-
for name in ('groupby', 'head', 'merge', 'mean')) and
6-
all(hasattr(df, name) for name in ('dtypes',)) and not
7-
any(hasattr(typ, name)
8-
for name in ('value_counts', 'dtype')))
5+
for name in ('groupby', 'head', 'merge', 'mean')
6+
and all(hasattr(df, name) for name in ('dtypes',))
7+
and not any(hasattr(typ, name)
8+
for name in ('value_counts', 'dtype'))))
99

1010

1111
def is_series_like(s):
1212
""" Looks like a Pandas Series. ** Borrowed from dask.dataframe.utils ** """
1313
typ = type(s)
14-
return (all(hasattr(typ, name) for name in ('groupby', 'head', 'mean')) and
15-
all(hasattr(s, name) for name in ('dtype', 'name')) and
16-
'index' not in typ.__name__.lower())
14+
return (all(hasattr(typ, name) for name in ('groupby', 'head', 'mean'))
15+
and all(hasattr(s, name) for name in ('dtype', 'name'))
16+
and 'index' not in typ.__name__.lower())
1717

1818

1919
def is_index_like(s):

0 commit comments

Comments
 (0)