Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#405)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.10...v0.5.0)

* Apply ruff fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kevin Phoenix <kevin@kphoenix.us>
  • Loading branch information
pre-commit-ci[bot] and twizmwazin authored Jul 1, 2024
1 parent a966125 commit 25165e1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
args: [--py310-plus]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ force-exclude = '''

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = [
"E",
"F",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pyvex.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def test_irstmt_dirty(self):
args = [pyvex.IRExpr.RdTmp.get_instance(i) for i in range(10)]
m = pyvex.IRStmt.Dirty("test_dirty", pyvex.IRConst.U8(1), args, 15, "Ifx_None", 0, 1, 0)
assert m.cee == "test_dirty"
assert type(m.guard) == pyvex.IRConst.U8
assert isinstance(m.guard, pyvex.IRConst.U8)
assert m.tmp == 15
assert m.mFx == "Ifx_None"
assert m.nFxState == 0
Expand Down
8 changes: 4 additions & 4 deletions tests/test_spotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ def test_tmrs():
ins = b"\xef\xf3\x08\x82"
b = pyvex.block.IRSB(ins, 1, arch)
assert b.jumpkind == "Ijk_Boring"
assert type(b.statements[1].data) == pyvex.expr.Get
assert isinstance(b.statements[1].data, pyvex.expr.Get)
assert arch.translate_register_name(b.statements[1].data.offset) in ["sp", "r13"]
assert type(b.statements[2]) == pyvex.stmt.Put
assert isinstance(b.statements[2], pyvex.stmt.Put)


def test_tmsr():
arch = pyvex.ARCH_ARM_LE
inss = b"\x82\xf3\x08\x88"
b = pyvex.block.IRSB(inss, 1, arch, opt_level=3)
assert b.jumpkind == "Ijk_Boring"
assert type(b.statements[1].data) == pyvex.expr.Get
assert isinstance(b.statements[1].data, pyvex.expr.Get)
assert arch.translate_register_name(b.statements[1].data.offset) == "r2"
assert type(b.statements[2]) == pyvex.stmt.Put
assert isinstance(b.statements[2], pyvex.stmt.Put)


if __name__ == "__main__":
Expand Down

0 comments on commit 25165e1

Please sign in to comment.