summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2023-04-12 04:05:25 -0400
committerJordan Wiens <jordan@psifertex.com>2023-04-12 04:05:25 -0400
commit4104cde86a6452bd7b371e08d9f7d3b7b420d31c (patch)
treeef1f9ed557e7efab4f6b2e4805bcd480b3540de7
parentfe274619fcb187edeb2c25cc2e8b3e9a7bbc2a00 (diff)
small pydoc tweaks
-rw-r--r--python/component.py37
-rw-r--r--python/flowgraph.py2
-rw-r--r--python/interaction.py6
3 files changed, 23 insertions, 22 deletions
diff --git a/python/component.py b/python/component.py
index baf6f2d9..940cbe97 100644
--- a/python/component.py
+++ b/python/component.py
@@ -1,4 +1,3 @@
-
import ctypes
import inspect
from typing import Generator, Optional, List, Tuple, Union, Mapping, Any, Dict, Iterator
@@ -176,13 +175,13 @@ class Component:
@property
def components(self) -> List['Component']:
"""
- ``components`` is an iterator for all Components contained within this Component
+ ``components`` is an iterator for all Components contained within this Component
- :return: A list of components
- :Example:
+ :return: A list of components
+ :Example:
- >>> for subcomp in component.components:
- ... print(repr(component))
+ >>> for subcomp in component.components:
+ ... print(repr(component))
"""
count = ctypes.c_ulonglong(0)
@@ -199,15 +198,15 @@ class Component:
@property
def function_list(self) -> List['function.Function']:
"""
- ``function_list`` List of all Functions contained within this Component
+ ``function_list`` List of all Functions contained within this Component
- :warning: .functions Should be used instead of this in any performance sensitive context.
+ :warning: .functions Should be used instead of this in any performance sensitive context.
- :return: A list of functions
- :Example:
+ :return: A list of functions
+ :Example:
- >>> for func in component.functions:
- ... print(func.name)
+ >>> for func in component.functions:
+ ... print(func.name)
"""
count = ctypes.c_ulonglong(0)
@@ -225,12 +224,14 @@ class Component:
@property
def functions(self) -> Iterator['function.Function']:
"""
- ``functions`` is an iterator for all Functions contained within this Component
- :return: An iterator containing Components
- :rtype: ComponentIterator
- :Example:
- >>> for func in component.functions:
- ... print(func.name)
+ ``functions`` is an iterator for all Functions contained within this Component
+
+ :return: An iterator containing Components
+ :rtype: ComponentIterator
+
+ :Example:
+ >>> for func in component.functions:
+ ... print(func.name)
"""
@dataclass
class FunctionIterator:
diff --git a/python/flowgraph.py b/python/flowgraph.py
index 73b9f6c8..b8a0b42a 100644
--- a/python/flowgraph.py
+++ b/python/flowgraph.py
@@ -808,7 +808,7 @@ class FlowGraph:
def update(self):
"""
``update`` can be overridden by subclasses to allow a graph to be updated after it has been
- presented in the UI. This will automatically occur if the function referenced by the :attr:`function`
+ presented in the UI. This will automatically occur if the function referenced by the :py:attr:`function`
property has been updated.
Return a new :class:`FlowGraph` object with the new information if updates are desired. If the graph
diff --git a/python/interaction.py b/python/interaction.py
index d97136d6..82066191 100644
--- a/python/interaction.py
+++ b/python/interaction.py
@@ -201,9 +201,6 @@ class AddressField:
disregarded. Additionally where as in the UI the result defaults to hexadecimal on the command-line 0x must be \
specified.
- :attr str prompt: prompt to be presented to the user
- :attr BinaryView view: BinaryView for the address
- :attr int current_address: current address to use as a base for relative calculations
"""
def __init__(self, prompt: str, view: Optional['binaryview.BinaryView'] = None, current_address: int = 0, default: Optional[int] = None):
self._prompt = prompt
@@ -231,6 +228,7 @@ class AddressField:
@property
def prompt(self):
+ """prompt to be presented to the user"""
return self._prompt
@prompt.setter
@@ -239,6 +237,7 @@ class AddressField:
@property
def view(self):
+ """BinaryView for the address"""
return self._view
@view.setter
@@ -247,6 +246,7 @@ class AddressField:
@property
def current_address(self):
+ """current address to use as a base for relative calculations"""
return self._current_address
@current_address.setter