Skip to content

Commit d971140

Browse files
authored
[CodeStyle] black -> ruff format migration - part 10 (#74663)
1 parent 1edb113 commit d971140

20 files changed

+0
-33
lines changed

test/legacy_test/test_multi_dot_op.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ def get_inputs_and_outputs(self):
294294

295295
# python API test
296296
class TestMultiDotOpError(unittest.TestCase):
297-
298297
def test_errors(self):
299298
with paddle.static.program_guard(
300299
paddle.static.Program(), paddle.static.Program()
@@ -335,7 +334,6 @@ def test_errors(self):
335334

336335

337336
class APITestMultiDot(unittest.TestCase):
338-
339337
def test_out(self):
340338
paddle.enable_static()
341339
with paddle.static.program_guard(paddle.static.Program()):

test/legacy_test/test_multi_label_soft_margin_loss.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def LogSigmoid(x):
140140

141141

142142
class TestMultiLabelMarginLoss(unittest.TestCase):
143-
144143
def test_MultiLabelSoftMarginLoss(self):
145144
input = np.random.uniform(0.1, 0.8, size=(5, 5)).astype(np.float64)
146145
label = np.random.randint(0, 2, size=(5, 5)).astype(np.float64)

test/legacy_test/test_multilabelmarginloss.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ def calc_multi_label_margin_loss(
203203

204204

205205
class TestMultiLabelMarginLoss(unittest.TestCase):
206-
207206
def test_MultiLabelMarginLoss(self):
208207
batch_size = 5
209208
num_classes = 4

test/legacy_test/test_multimarginloss.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ def calc_multi_margin_loss(
239239

240240

241241
class TestMultiMarginLoss(unittest.TestCase):
242-
243242
def test_MultiMarginLoss(self):
244243
batch_size = 5
245244
num_classes = 2

test/legacy_test/test_multiplex_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ def init_dtype(self):
9595

9696

9797
class TestMultiplexOpError(unittest.TestCase):
98-
9998
def test_errors(self):
10099
paddle.enable_static()
101100
with base.program_guard(base.Program(), base.Program()):

test/legacy_test/test_multiply.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def multiply_shape_error():
228228

229229

230230
class TestMultiplyApiZeroSize(TestMultiplyApi):
231-
232231
# only support the 0 size tensor
233232
def _test_grad(self, x_data, y_data):
234233
paddle.disable_static()

test/legacy_test/test_mv_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ def test_static_graph(self):
106106

107107

108108
class TestMVError(unittest.TestCase):
109-
110109
def test_input(self):
111110
def test_shape():
112111
paddle.enable_static()

test/legacy_test/test_nansum_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
class API_Test_Nansum(unittest.TestCase):
24-
2524
def test_static_graph(self):
2625
paddle.enable_static()
2726
startup_program = paddle.static.Program()
@@ -146,7 +145,6 @@ def test_dygraph(self):
146145

147146

148147
class API_Test_Nansum_ZeroSize(unittest.TestCase):
149-
150148
def test_dygraph(self):
151149
x = np.random.random([2, 0, 3]).astype(np.float32)
152150
with base.dygraph.guard():

test/legacy_test/test_negative.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121

2222
class TestNegativeApi(unittest.TestCase):
23-
2423
def setUp(self):
2524
paddle.disable_static()
2625
self.shape = [2, 3, 4, 5]

test/legacy_test/test_nll_loss.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,6 @@ def test_name(self):
11831183

11841184

11851185
class TestNLLLossInvalidArgs(unittest.TestCase):
1186-
11871186
def test_x_dim_value_error(self):
11881187
def test_x_dim_lt_2():
11891188
# place = paddle.CPUPlace()

0 commit comments

Comments
 (0)