diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2022-05-06 00:25:41 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2022-05-06 00:25:41 -0400 |
| commit | bfeba3302e995fdba373603533fce54bf788adff (patch) | |
| tree | 2e4aadbb53e43a7022167ecdff4e241474279e6d /python/function.py | |
| parent | 245ee620d94a21d5e0005bd634a10bb6163efb64 (diff) | |
many pydoc formatting cleanups, added deprecated decorator and replaced ad-hoc messages with consistent decorator
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/python/function.py b/python/function.py index 40b9901d..fc9ec860 100644 --- a/python/function.py +++ b/python/function.py @@ -59,6 +59,7 @@ from .variable import ( Variable, LookupTableEntry, RegisterValue, ValueRange, PossibleValueSet, StackVariableReference, ConstantReference, IndirectBranchInfo, ParameterVariables, AddressRange ) +from . import decorators from .enums import RegisterValueType ExpressionIndex = int @@ -1291,14 +1292,20 @@ class Function: yield i[0], start start += i[1] + @decorators.deprecated @property def llil_instructions(self) -> Generator['lowlevelil.LowLevelILInstruction', None, None]: - """Deprecated method provided for compatibility. Use llil.instructions instead. Was: A generator of llil instructions of the current function""" + """ + .. note:: Use :py:meth:`LowLevelIlFunction.instructions` instead. + """ return self.llil.instructions + @decorators.deprecated @property def mlil_instructions(self) -> Generator['mediumlevelil.MediumLevelILInstruction', None, None]: - """Deprecated method provided for compatibility. Use mlil.instructions instead. Was: A generator of mlil instructions of the current function""" + """ + .. note:: Use :py:meth:`MediumLevelIlFunction.instructions` instead. + """ return self.mlil.instructions @property @@ -1346,8 +1353,11 @@ class Function: def get_comment_at(self, addr: int) -> str: return core.BNGetCommentForAddress(self.handle, addr) + @decorators.deprecated def set_comment(self, addr: int, comment: str) -> None: - """Deprecated method provided for compatibility. Use set_comment_at instead.""" + """ + .. note:: Use :py:meth:`set_comment_at` instead. + """ core.BNSetCommentForAddress(self.handle, addr, comment) def set_comment_at(self, addr: int, comment: str) -> None: |
