Remove leading underscore from static methods
This commit is contained in:
parent
f13e9deb71
commit
6b6ef4d2cb
2 changed files with 4 additions and 4 deletions
|
@ -140,7 +140,7 @@ class EventHandler(Dependant):
|
||||||
self.processor = processor
|
self.processor = processor
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _int_to_hex_str(addr: int) -> str:
|
def int_to_hex_str(addr: int) -> str:
|
||||||
"""Format an `int` into an hex `str`."""
|
"""Format an `int` into an hex `str`."""
|
||||||
return f'0x{addr:X}'
|
return f'0x{addr:X}'
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ProfileHandler(EventHandler):
|
||||||
|
|
||||||
self._data_model = ProfileDataModel()
|
self._data_model = ProfileDataModel()
|
||||||
self._address_to_func = {
|
self._address_to_func = {
|
||||||
self._addr_to_int(addr): name for addr, name in address_to_func.items()
|
self.addr_to_int(addr): name for addr, name in address_to_func.items()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Temporary buffers
|
# Temporary buffers
|
||||||
|
@ -83,7 +83,7 @@ class ProfileHandler(EventHandler):
|
||||||
self._current_funcs: Dict[int, List[List[Union[str, int]]]] = defaultdict(list)
|
self._current_funcs: Dict[int, List[List[Union[str, int]]]] = defaultdict(list)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _addr_to_int(addr: Union[int, str]) -> int:
|
def addr_to_int(addr: Union[int, str]) -> int:
|
||||||
"""Transform an address into an `int` if it's a hex `str`."""
|
"""Transform an address into an `int` if it's a hex `str`."""
|
||||||
return int(addr, 16) if isinstance(addr, str) else addr
|
return int(addr, 16) if isinstance(addr, str) else addr
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class ProfileHandler(EventHandler):
|
||||||
address = get_field(event, 'addr')
|
address = get_field(event, 'addr')
|
||||||
resolution = self._resolve_function_address(address)
|
resolution = self._resolve_function_address(address)
|
||||||
if resolution is None:
|
if resolution is None:
|
||||||
resolution = self._int_to_hex_str(address)
|
resolution = self.int_to_hex_str(address)
|
||||||
return resolution
|
return resolution
|
||||||
|
|
||||||
def _resolve_function_address(
|
def _resolve_function_address(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue