Skip to content

Commit 34700f0

Browse files
authored
[CodeStyle] bump ruff version to 0.3.5 (#63206)
1 parent d8d4e51 commit 34700f0

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ repos:
5757
- id: black
5858
files: (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
5959
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: v0.3.0
60+
rev: v0.3.5
6161
hooks:
6262
- id: ruff
6363
args: [--fix, --exit-non-zero-on-fix, --no-cache]

test/ir/pir/fused_pass/xpu/pass_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@ def check_fused_ops(self, program):
5454
actual_valid_op_count = op_names.count(valid_op_name)
5555
self.assertTrue(
5656
valid_op_count == actual_valid_op_count,
57-
"Checking of the number of fused operator < {} > failed. "
58-
"Expected: {}, Received: {}".format(
59-
valid_op_name, valid_op_count, actual_valid_op_count
60-
),
57+
f"Checking of the number of fused operator < {valid_op_name} > failed. "
58+
f"Expected: {valid_op_count}, Received: {actual_valid_op_count}",
6159
)
6260

6361
@abc.abstractmethod

test/legacy_test/test_stack_extension_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def test_dtype(self):
375375
class TestRowStack(BaseTest, BaseCases):
376376
def setUp(self):
377377
self.func_paddle = paddle.row_stack
378-
self.func_numpy = np.row_stack
378+
self.func_numpy = np.vstack
379379

380380
def test_mix_ndim(self):
381381
d0 = generate_data([2], count=1, dtype='float64')
@@ -495,7 +495,7 @@ def setUp(self):
495495
class TestErrorRowStack(BaseTest, ErrorCases0d1d):
496496
def setUp(self):
497497
self.func_paddle = paddle.row_stack
498-
self.func_numpy = np.row_stack
498+
self.func_numpy = np.vstack
499499

500500

501501
if __name__ == '__main__':

0 commit comments

Comments
 (0)