Skip to content

Commit

Permalink
[CodeStyle] bump ruff version to 0.3.5 (#63206)
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo authored Apr 3, 2024
1 parent d8d4e51 commit 34700f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ repos:
- id: black
files: (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
rev: v0.3.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]
Expand Down
6 changes: 2 additions & 4 deletions test/ir/pir/fused_pass/xpu/pass_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ def check_fused_ops(self, program):
actual_valid_op_count = op_names.count(valid_op_name)
self.assertTrue(
valid_op_count == actual_valid_op_count,
"Checking of the number of fused operator < {} > failed. "
"Expected: {}, Received: {}".format(
valid_op_name, valid_op_count, actual_valid_op_count
),
f"Checking of the number of fused operator < {valid_op_name} > failed. "
f"Expected: {valid_op_count}, Received: {actual_valid_op_count}",
)

@abc.abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions test/legacy_test/test_stack_extension_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def test_dtype(self):
class TestRowStack(BaseTest, BaseCases):
def setUp(self):
self.func_paddle = paddle.row_stack
self.func_numpy = np.row_stack
self.func_numpy = np.vstack

def test_mix_ndim(self):
d0 = generate_data([2], count=1, dtype='float64')
Expand Down Expand Up @@ -495,7 +495,7 @@ def setUp(self):
class TestErrorRowStack(BaseTest, ErrorCases0d1d):
def setUp(self):
self.func_paddle = paddle.row_stack
self.func_numpy = np.row_stack
self.func_numpy = np.vstack


if __name__ == '__main__':
Expand Down

0 comments on commit 34700f0

Please sign in to comment.