Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and ltfish committed Dec 11, 2024
1 parent 3eaba1e commit 7f386b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions pyvex/expr.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

import logging
import re
from typing import Optional, TYPE_CHECKING

from typing import TYPE_CHECKING

from .const import U8, U16, U32, U64, IRConst, get_type_size
from .enums import IRCallee, IRRegArray, VEXObject, get_enum_from_int, get_int_from_enum
Expand Down Expand Up @@ -35,7 +35,7 @@ def _pp_str(self) -> str:
raise NotImplementedError

@property
def child_expressions(self) -> list["IRExpr"]:
def child_expressions(self) -> list[IRExpr]:
"""
A list of all of the expressions that this expression ends up evaluating.
"""
Expand Down Expand Up @@ -100,7 +100,7 @@ def replace_expression(self, replacements):
v.replace_expression(replacements)

@staticmethod
def _from_c(c_expr) -> Optional["IRExpr"]:
def _from_c(c_expr) -> IRExpr | None:
if c_expr == ffi.NULL or c_expr[0] == ffi.NULL:
return None

Expand Down Expand Up @@ -621,14 +621,14 @@ class Const(IRExpr):

tag = "Iex_Const"

def __init__(self, con: "IRConst"):
def __init__(self, con: IRConst):
self._con = con

def _pp_str(self):
return str(self.con)

@property
def con(self) -> "IRConst":
def con(self) -> IRConst:
return self._con

@staticmethod
Expand Down
10 changes: 5 additions & 5 deletions pyvex/stmt.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

from typing import TYPE_CHECKING
import logging
from collections.abc import Iterator
from typing import TYPE_CHECKING

from . import expr
from .const import IRConst
Expand Down Expand Up @@ -31,7 +31,7 @@ def pp(self):
print(str(self))

@property
def child_expressions(self) -> Iterator["IRExpr"]:
def child_expressions(self) -> Iterator[IRExpr]:
for k in self.__slots__:
v = getattr(self, k)
if isinstance(v, IRExpr):
Expand Down Expand Up @@ -171,7 +171,7 @@ class Put(IRStmt):

tag = "Ist_Put"

def __init__(self, data: "IRExpr", offset: int):
def __init__(self, data: IRExpr, offset: int):
self.data = data
self.offset = offset

Expand Down Expand Up @@ -240,7 +240,7 @@ class WrTmp(IRStmt):

tag = "Ist_WrTmp"

def __init__(self, tmp, data: "IRExpr"):
def __init__(self, tmp, data: IRExpr):
self.tmp = tmp
self.data = data

Expand Down Expand Up @@ -278,7 +278,7 @@ class Store(IRStmt):

tag = "Ist_Store"

def __init__(self, addr: "IRExpr", data: "IRExpr", end: str):
def __init__(self, addr: IRExpr, data: IRExpr, end: str):
self.addr = addr
self.data = data
self.end = end
Expand Down

0 comments on commit 7f386b6

Please sign in to comment.