Skip to content

Commit 10e6472

Browse files
authored
[CodeStyle] black -> ruff format migration - part 9 (#74662)
1 parent 604e5a7 commit 10e6472

20 files changed

+0
-33
lines changed

test/legacy_test/test_isfinite_v2_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ def test_neginf(self):
316316

317317

318318
class TestError(unittest.TestCase):
319-
320319
def test_bad_input(self):
321320
paddle.enable_static()
322321
with paddle.static.program_guard(paddle.static.Program()):

test/legacy_test/test_jit_save_load.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,6 @@ def dfs(obj1, obj2):
709709

710710

711711
class TestSaveLoadWithDictInput(unittest.TestCase):
712-
713712
def test_dict_input(self):
714713
# NOTE: This net cannot be executed, it is just
715714
# a special case for exporting models in model validation
@@ -765,7 +764,6 @@ def test_dict_input(self):
765764

766765

767766
class TestSaveLoadWithDictInputNoPrune(unittest.TestCase):
768-
769767
def test_dict_input(self):
770768
net = LinearNetWithDictInputNoPrune(8, 8)
771769
temp_dir = tempfile.TemporaryDirectory()

test/legacy_test/test_l1_loss.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def test_gpu(self):
9898

9999
# test case the raise message
100100
def test_errors(self):
101-
102101
def test_value_error():
103102
input = paddle.static.data(
104103
name='input', shape=[10, 10, 5], dtype='float32'
@@ -194,7 +193,6 @@ def test_gpu(self):
194193

195194
# test case the raise message
196195
def test_errors(self):
197-
198196
def test_value_error():
199197
loss = paddle.nn.loss.L1Loss(reduction="reduce_mean")
200198

test/legacy_test/test_lambv2_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def test_lamb_op(self):
113113

114114

115115
class TestLambOpWithCombinedOp(unittest.TestCase):
116-
117116
def test_lamb_op_with_multi_steps(self):
118117
paddle.enable_static()
119118

test/legacy_test/test_layerlist.py

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

2020
class TestLayerListEmptyInsert(unittest.TestCase):
2121
def test_insert_empty_list(self):
22-
2322
# Test successful case - insert at index 0
2423
layers = paddle.nn.LayerList()
2524
linear = paddle.nn.Linear(10, 10)

test/legacy_test/test_linalg_cond.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def gen_empty_input():
8282

8383

8484
class API_TestStaticCond(unittest.TestCase):
85-
8685
def test_out(self):
8786
paddle.enable_static()
8887
# test calling results of 'cond' in static graph mode
@@ -92,7 +91,6 @@ def test_out(self):
9291

9392

9493
class API_TestDygraphCond(unittest.TestCase):
95-
9694
def test_out(self):
9795
paddle.disable_static()
9896
# test calling results of 'cond' in dynamic mode
@@ -102,7 +100,6 @@ def test_out(self):
102100

103101

104102
class TestCondAPIError(unittest.TestCase):
105-
106103
def test_dygraph_api_error(self):
107104
paddle.disable_static()
108105
# test raising errors when 'cond' is called in dygraph mode
@@ -154,7 +151,6 @@ def test_static_empty_input_error(self):
154151

155152

156153
class TestCondEmptyTensorInput(unittest.TestCase):
157-
158154
def test_dygraph_empty_tensor_input(self):
159155
paddle.disable_static()
160156
# test calling results of 'cond' when input is an empty tensor in dynamic mode

test/legacy_test/test_linear_interp_v2_op.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@ def init_test_case(self):
528528

529529

530530
class TestLinearInterpOpError(unittest.TestCase):
531-
532531
def test_error(self):
533532
with (
534533
paddle_static_guard(),

test/legacy_test/test_log_normal.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def set_attrs(self):
177177

178178

179179
class TestLogNormalAlias(unittest.TestCase):
180-
181180
def test_alias(self):
182181
paddle.disable_static()
183182
shape = [1, 2, 3]
@@ -188,7 +187,6 @@ def test_alias(self):
188187

189188

190189
class TestLogNormalErrors(unittest.TestCase):
191-
192190
def test_errors(self):
193191
main_program = paddle.static.Program()
194192
with paddle.static.program_guard(main_program):

test/legacy_test/test_logspace.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def init_data(self):
145145

146146

147147
class TestLogspaceAPI(unittest.TestCase):
148-
149148
def test_variable_input1(self):
150149
paddle.enable_static()
151150
prog = paddle.static.Program()

test/legacy_test/test_lookahead.py

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

2727

2828
class TestLookAhead(unittest.TestCase):
29-
3029
def test_lookahead_static(self):
3130
paddle.enable_static()
3231
place = base.CPUPlace()

0 commit comments

Comments
 (0)