Skip to content

Commit 9f8310f

Browse files
authored
[CodeStyle] black -> ruff format migration - part 12 (#74665)
1 parent 1238215 commit 9f8310f

20 files changed

+0
-36
lines changed

test/legacy_test/test_scale_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def test_scale_selected_rows_inplace(self):
133133

134134

135135
class TestScaleRaiseError(unittest.TestCase):
136-
137136
def test_errors(self):
138137
paddle.enable_static()
139138

test/legacy_test/test_searchsorted_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ def test_out_int32(self):
251251

252252

253253
class TestSearchSortedError(unittest.TestCase):
254-
255254
def test_error_api(self):
256255
paddle.enable_static()
257256

test/legacy_test/test_stack_op.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ def test_case(self):
279279

280280

281281
class API_test(unittest.TestCase):
282-
283282
def test_out(self):
284283
with paddle.static.program_guard(
285284
paddle.static.Program(), paddle.static.Program()
@@ -336,7 +335,6 @@ def test_single_tensor_error(self):
336335

337336

338337
class TestStackOpWithNegativeShape(unittest.TestCase):
339-
340338
def test_out(self):
341339
main_prg, startup_prg = paddle.static.Program(), paddle.static.Program()
342340
with paddle.static.program_guard(main_prg, startup_prg):

test/legacy_test/test_static_save_load.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,6 @@ def set_var(var, ndarray):
10721072

10731073

10741074
class TestStaticSaveLoadPickle(unittest.TestCase):
1075-
10761075
def test_pickle_protocol(self):
10771076
# enable static graph mode
10781077
paddle.enable_static()

test/legacy_test/test_static_save_load_large.py

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

2929

3030
class TestStaticSaveLoadLargeParameters(unittest.TestCase):
31-
3231
def test_large_parameters_static_save(self):
3332
# enable static graph mode
3433
paddle.enable_static()

test/legacy_test/test_std_layer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ def test_error(self):
118118

119119

120120
class Testfp16Std(unittest.TestCase):
121-
122121
def test_fp16_with_gpu(self):
123122
paddle.enable_static()
124123
if paddle.base.core.is_compiled_with_cuda():

test/legacy_test/test_stride.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ def test_stride_gpu(self):
10031003

10041004

10051005
class TestToStaticCheck(unittest.TestCase):
1006-
10071006
def test_error(self):
10081007
@paddle.jit.to_static(full_graph=True)
10091008
def func1():
@@ -1070,7 +1069,6 @@ def func2():
10701069
func2()
10711070

10721071
def test_no_error(self):
1073-
10741072
@paddle.jit.to_static(full_graph=True)
10751073
def func1():
10761074
x_np = np.random.random(size=[2, 3, 4]).astype('float32')

test/legacy_test/test_sum_op.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@ def test_static(self):
431431

432432

433433
class API_Test_Add_n(unittest.TestCase):
434-
435434
def test_api(self):
436435
with base.program_guard(base.Program(), base.Program()):
437436
input0 = paddle.tensor.fill_constant(
@@ -502,7 +501,6 @@ def test_add_n_and_add_and_grad(self):
502501

503502

504503
class TestRaiseSumError(unittest.TestCase):
505-
506504
def test_errors(self):
507505
with paddle.static.program_guard(
508506
paddle.static.Program(), paddle.static.Program()
@@ -534,7 +532,6 @@ def test_dtype1():
534532

535533

536534
class TestRaiseSumsError(unittest.TestCase):
537-
538535
def test_errors(self):
539536
with paddle.static.program_guard(
540537
paddle.static.Program(), paddle.static.Program()

test/legacy_test/test_switch_case.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727

2828
class TestAPISwitchCase(unittest.TestCase):
29-
3029
def test_return_single_var(self):
3130
def fn_1():
3231
return paddle.tensor.fill_constant(
@@ -371,7 +370,6 @@ def fn_3():
371370

372371

373372
class TestAPISwitchCase_Nested(unittest.TestCase):
374-
375373
def test_nested_switch_case(self):
376374
def fn_1(x=1):
377375
out = paddle.static.nn.switch_case(
@@ -580,7 +578,6 @@ def fn_3():
580578

581579
# test TypeError and ValueError of api switch_case
582580
class TestAPISwitchCase_Error(unittest.TestCase):
583-
584581
def test_error(self):
585582
def fn_1():
586583
return paddle.tensor.fill_constant(

test/legacy_test/test_take_along_axis_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ def test_error(self):
409409
class TestTakeAlongAxisAPICase4(unittest.TestCase):
410410
def test_static_shape_take_along_axis(self):
411411
with dygraph_guard():
412-
413412
x = paddle.randn([4, 2])
414413
ind = paddle.to_tensor([[0, 1]])
415414

0 commit comments

Comments
 (0)