Skip to content

Commit 388ed3a

Browse files
committed
CLN: remove empty class creation parenteseses
1 parent d024aae commit 388ed3a

19 files changed

+30
-30
lines changed

pandas/tests/dtypes/test_inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def test_mixed_dtypes_remain_object_array(self):
498498
class TestTypeInference:
499499

500500
# Dummy class used for testing with Python objects
501-
class Dummy():
501+
class Dummy:
502502
pass
503503

504504
def test_inferred_dtype_fixture(self, any_skipna_inferred_dtype):

pandas/tests/frame/test_alter_axes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import pandas.util.testing as tm
1616

1717

18-
class TestDataFrameAlterAxes():
18+
class TestDataFrameAlterAxes:
1919

2020
def test_set_index_directly(self, float_string_frame):
2121
df = float_string_frame

pandas/tests/frame/test_apply.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def int_frame_const_col():
2929
return df
3030

3131

32-
class TestDataFrameApply():
32+
class TestDataFrameApply:
3333

3434
def test_apply(self, float_frame):
3535
with np.errstate(all='ignore'):
@@ -829,7 +829,7 @@ def zip_frames(frames, axis=1):
829829
return pd.DataFrame(zipped)
830830

831831

832-
class TestDataFrameAggregate():
832+
class TestDataFrameAggregate:
833833

834834
def test_agg_transform(self, axis, float_frame):
835835
other_axis = 1 if axis in {0, 'index'} else 0

pandas/tests/frame/test_asof.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def date_range_frame():
1717
return DataFrame({'A': np.arange(N), 'B': np.arange(N)}, index=rng)
1818

1919

20-
class TestFrameAsof():
20+
class TestFrameAsof:
2121

2222
def test_basic(self, date_range_frame):
2323
df = date_range_frame

pandas/tests/frame/test_block_internals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# structure
2020

2121

22-
class TestDataFrameBlockInternals():
22+
class TestDataFrameBlockInternals:
2323
def test_setitem_invalidates_datetime_index_freq(self):
2424
# GH#24096 altering a datetime64tz column inplace invalidates the
2525
# `freq` attribute on the underlying DatetimeIndex

pandas/tests/frame/test_combine_concat.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pandas.util.testing import assert_frame_equal, assert_series_equal
1212

1313

14-
class TestDataFrameConcatCommon():
14+
class TestDataFrameConcatCommon:
1515

1616
def test_concat_multiple_frames_dtypes(self):
1717

@@ -532,7 +532,7 @@ def test_concat_astype_dup_col(self):
532532
tm.assert_frame_equal(result, expected)
533533

534534

535-
class TestDataFrameCombineFirst():
535+
class TestDataFrameCombineFirst:
536536

537537
def test_combine_first_mixed(self):
538538
a = Series(['a', 'b'], index=lrange(2))
@@ -867,7 +867,7 @@ def test_concat_datetime_datetime64_frame(self):
867867
pd.concat([df1, df2_obj])
868868

869869

870-
class TestDataFrameUpdate():
870+
class TestDataFrameUpdate:
871871

872872
def test_update_nan(self):
873873
# #15593 #15617

pandas/tests/frame/test_constructors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ def __len__(self, n):
10011001

10021002
def test_constructor_iterable(self):
10031003
# GH 21987
1004-
class Iter():
1004+
class Iter:
10051005
def __iter__(self):
10061006
for i in range(10):
10071007
yield [1, 2, 3]

pandas/tests/frame/test_missing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _skip_if_no_pchip():
2222
pytest.skip('scipy.interpolate.pchip missing')
2323

2424

25-
class TestDataFrameMissingData():
25+
class TestDataFrameMissingData:
2626

2727
def test_dropEmptyRows(self, float_frame):
2828
N = len(float_frame.index)
@@ -644,7 +644,7 @@ def test_fill_value_when_combine_const(self):
644644
assert_frame_equal(res, exp)
645645

646646

647-
class TestDataFrameInterpolate():
647+
class TestDataFrameInterpolate:
648648

649649
def test_interp_basic(self):
650650
df = DataFrame({'A': [1, 2, np.nan, 4],

pandas/tests/frame/test_mutate_columns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Column add, remove, delete.
1111

1212

13-
class TestDataFrameMutateColumns():
13+
class TestDataFrameMutateColumns:
1414

1515
def test_assign(self):
1616
df = DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})

pandas/tests/groupby/test_grouping.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_getitem_numeric_column_names(self):
9393
# grouping
9494
# --------------------------------
9595

96-
class TestGrouping():
96+
class TestGrouping:
9797

9898
def test_grouper_index_types(self):
9999
# related GH5375
@@ -556,7 +556,7 @@ def test_list_grouper_with_nat(self):
556556
# get_group
557557
# --------------------------------
558558

559-
class TestGetGroup():
559+
class TestGetGroup:
560560
def test_get_group(self):
561561
# GH 5267
562562
# be datelike friendly
@@ -660,7 +660,7 @@ def test_gb_key_len_equal_axis_len(self):
660660
# groups & iteration
661661
# --------------------------------
662662

663-
class TestIteration():
663+
class TestIteration:
664664

665665
def test_groups(self, df):
666666
grouped = df.groupby(['A'])

pandas/tests/io/parser/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ def test_invalid_file_buffer_mock(all_parsers):
18051805
parser = all_parsers
18061806
msg = "Invalid file path or buffer object type"
18071807

1808-
class Foo():
1808+
class Foo:
18091809
pass
18101810

18111811
with pytest.raises(ValueError, match=msg):

pandas/tests/io/test_gcs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_read_csv_gcs(monkeypatch):
2121
df1 = DataFrame({'int': [1, 3], 'float': [2.0, np.nan], 'str': ['t', 's'],
2222
'dt': date_range('2018-06-18', periods=2)})
2323

24-
class MockGCSFileSystem():
24+
class MockGCSFileSystem:
2525
def open(*args):
2626
return StringIO(df1.to_csv(index=False))
2727

@@ -37,7 +37,7 @@ def test_to_csv_gcs(monkeypatch):
3737
'dt': date_range('2018-06-18', periods=2)})
3838
s = StringIO()
3939

40-
class MockGCSFileSystem():
40+
class MockGCSFileSystem:
4141
def open(*args):
4242
return s
4343

pandas/tests/series/test_apply.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from pandas.util.testing import assert_frame_equal, assert_series_equal
1414

1515

16-
class TestSeriesApply():
16+
class TestSeriesApply:
1717

1818
def test_apply(self, datetime_series):
1919
with np.errstate(all='ignore'):
@@ -172,7 +172,7 @@ def test_apply_categorical_with_nan_values(self, series):
172172
tm.assert_series_equal(result, expected)
173173

174174

175-
class TestSeriesAggregate():
175+
class TestSeriesAggregate:
176176

177177
def test_transform(self, string_series):
178178
# transforming functions
@@ -418,7 +418,7 @@ def test_agg_cython_table_raises(self, series, func, expected):
418418
series.agg(func)
419419

420420

421-
class TestSeriesMap():
421+
class TestSeriesMap:
422422

423423
def test_map(self, datetime_series):
424424
index, data = tm.getMixedTypeDict()

pandas/tests/series/test_asof.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pandas.util.testing as tm
66

77

8-
class TestSeriesAsof():
8+
class TestSeriesAsof:
99

1010
def test_basic(self):
1111

pandas/tests/series/test_constructors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_constructor_series(self):
192192

193193
def test_constructor_iterable(self):
194194
# GH 21987
195-
class Iter():
195+
class Iter:
196196
def __iter__(self):
197197
for i in range(10):
198198
yield i

pandas/tests/series/test_datetime_values.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pandas.util.testing import assert_series_equal
2222

2323

24-
class TestSeriesDatetimeValues():
24+
class TestSeriesDatetimeValues:
2525

2626
def test_dt_namespace_accessor(self):
2727

pandas/tests/series/test_io.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from pandas.io.common import _get_handle
1515

1616

17-
class TestSeriesToCSV():
17+
class TestSeriesToCSV:
1818

1919
def read_csv(self, path, **kwargs):
2020
params = dict(squeeze=True, index_col=0,
@@ -191,7 +191,7 @@ def test_to_csv_compression(self, s, encoding, compression):
191191
encoding=encoding))
192192

193193

194-
class TestSeriesIO():
194+
class TestSeriesIO:
195195

196196
def test_to_frame(self, datetime_series):
197197
datetime_series.name = None

pandas/tests/series/test_missing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _simple_ts(start, end, freq='D'):
3939
return Series(np.random.randn(len(rng)), index=rng)
4040

4141

42-
class TestSeriesMissingData():
42+
class TestSeriesMissingData:
4343

4444
def test_remove_na_deprecation(self):
4545
# see gh-16971
@@ -875,7 +875,7 @@ def interp_methods_ind(request):
875875
return method, kwargs
876876

877877

878-
class TestSeriesInterpolateData():
878+
class TestSeriesInterpolateData:
879879
def test_interpolate(self, datetime_series, string_series):
880880
ts = Series(np.arange(len(datetime_series), dtype=float),
881881
datetime_series.index)

pandas/util/_test_decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
The decorators can be applied to classes:
1313
1414
@td.skip_if_some_reason
15-
class Foo():
15+
class Foo:
1616
...
1717
1818
Or individual functions:

0 commit comments

Comments
 (0)