summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGalen Williamson <galen@vector35.com>2022-12-23 15:06:22 -0500
committerGalen Williamson <galen@vector35.com>2022-12-23 16:29:38 -0500
commit47d44cd285530729b94e5960a93648047fc0b4ce (patch)
treecf546c078c8843599b501ab489f3e25dd7d14552 /python
parent8e82653a052cb1b32e2d5ca53fd8f014df3e8737 (diff)
Fixed missing newlines before `:param` in docstrings
This was causing the generated html to not show the param lines correctly.
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py1
-rw-r--r--python/enterprise.py1
-rw-r--r--python/function.py8
-rw-r--r--python/typeparser.py4
-rw-r--r--python/typeprinter.py8
-rw-r--r--python/types.py8
6 files changed, 29 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index e3ab5898..40b5c1ff 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -7791,6 +7791,7 @@ class BinaryView:
``get_comment_at`` returns the address-based comment attached to the given address in this BinaryView
Note that address-based comments are different from function-level comments which are specific to each :py:Class:`Function`.
For more information, see :func:`address_comments`.
+
:param int addr: virtual address within the current BinaryView to apply the comment to
:rtype: str
diff --git a/python/enterprise.py b/python/enterprise.py
index b95ff1e0..fdd0bb74 100644
--- a/python/enterprise.py
+++ b/python/enterprise.py
@@ -291,6 +291,7 @@ class LicenseCheckout:
def __init__(self, duration=900, _cache=True, release=True):
"""
Get a new license checkout
+
:param duration: Duration between refreshes
:param _cache: Deprecated but left in for compatibility
:param release: If the license should be released at the end of scope. If False, you
diff --git a/python/function.py b/python/function.py
index 8523e485..a6693d85 100644
--- a/python/function.py
+++ b/python/function.py
@@ -827,6 +827,7 @@ class Function:
``add_auto_function_tag`` adds an already-created Tag object as a function tag.
If you want to create the tag as well, consider using
:meth:`create_auto_function_tag <function.Function.create_auto_function_tag>`
+
:param Tag tag: Tag object to be added
:rtype: None
"""
@@ -2618,6 +2619,7 @@ class Function:
) -> IntegerDisplayType:
"""
Get the current text display type for an integer token in the disassembly or IL views
+
:param int instr_addr: Address of the instruction or IL line containing the token
:param int value: ``value`` field of the InstructionTextToken object for the token, usually the constant displayed
:param int operand: Operand index of the token, defined as the number of OperandSeparatorTokens in the disassembly line before the token
@@ -2635,6 +2637,7 @@ class Function:
) -> None:
"""
Change the text display type for an integer token in the disassembly or IL views
+
:param int instr_addr: Address of the instruction or IL line containing the token
:param int value: ``value`` field of the InstructionTextToken object for the token, usually the constant displayed
:param int operand: Operand index of the token, defined as the number of OperandSeparatorTokens in the disassembly line before the token
@@ -2650,9 +2653,10 @@ class Function:
def reanalyze(self, update_type: Optional[FunctionUpdateType] = FunctionUpdateType.UserFunctionUpdate) -> None:
"""
``reanalyze`` causes this functions to be reanalyzed. This function does not wait for the analysis to finish.
+
:param enums.FunctionUpdateType update_type: (optional) Desired update type
- .. warning:: If analysis_skipped is True, using this API will not trigger re-analysis. Instead, set analysis_skipped to false.
+ .. warning:: If analysis_skipped is True, using this API will not trigger re-analysis. Instead, set `analysis_skipped` to `False`.
:rtype: None
"""
@@ -2661,6 +2665,7 @@ class Function:
def mark_updates_required(self, update_type: Optional[FunctionUpdateType] = FunctionUpdateType.UserFunctionUpdate) -> None:
"""
``mark_updates_required`` indicates that this function needs to be reanalyzed during the next update cycle
+
:param enums.FunctionUpdateType update_type: (optional) Desired update type
:rtype: None
@@ -2670,6 +2675,7 @@ class Function:
def mark_caller_updates_required(self, update_type: Optional[FunctionUpdateType] = FunctionUpdateType.UserFunctionUpdate) -> None:
"""
``mark_caller_updates_required`` indicates that callers of this function need to be reanalyzed during the next update cycle
+
:param enums.FunctionUpdateType update_type: (optional) Desired update type
:rtype: None
diff --git a/python/typeparser.py b/python/typeparser.py
index 1b8fe57a..300c714e 100644
--- a/python/typeparser.py
+++ b/python/typeparser.py
@@ -425,6 +425,7 @@ class TypeParser(metaclass=_TypeParserMetaclass):
def get_option_text(self, option: TypeParserOption, value: str) -> Optional[str]:
"""
Get the string representation of an option for passing to parse_type_*
+
:param option: Option type
:param value: Option value
:return: A string representing the option if the parser supports it, otherwise None
@@ -438,6 +439,7 @@ class TypeParser(metaclass=_TypeParserMetaclass):
) -> Tuple[Optional[str], List[TypeParserError]]:
"""
Preprocess a block of source, returning the source that would be parsed
+
:param source: Source code to process
:param file_name: Name of the file containing the source (does not need to exist on disk)
:param platform: Platform to assume the source is relevant to
@@ -457,6 +459,7 @@ class TypeParser(metaclass=_TypeParserMetaclass):
) -> Tuple[Optional[TypeParserResult], List[TypeParserError]]:
"""
Parse an entire block of source into types, variables, and functions
+
:param source: Source code to parse
:param file_name: Name of the file containing the source (optional: exists on disk)
:param platform: Platform to assume the types are relevant to
@@ -474,6 +477,7 @@ class TypeParser(metaclass=_TypeParserMetaclass):
) -> Tuple[Optional[Tuple['types.QualifiedNameType', 'types.Type']], List[TypeParserError]]:
"""
Parse a single type and name from a string containing their definition.
+
:param source: Source code to parse
:param platform: Platform to assume the types are relevant to
:param existing_types: Optional map of all existing types to use for parsing context
diff --git a/python/typeprinter.py b/python/typeprinter.py
index b9ccabf7..825156df 100644
--- a/python/typeprinter.py
+++ b/python/typeprinter.py
@@ -304,6 +304,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
def get_type_tokens(self, type: types.Type, platform: Optional[_platform.Platform] = None, name: types.QualifiedNameType = "", base_confidence: int = core.max_confidence, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> List[_function.InstructionTextToken]:
"""
Generate a single-line text representation of a type
+
:param type: Type to print
:param platform: Platform responsible for this type
:param name: Name of the type
@@ -317,6 +318,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
"""
In a single-line text representation of a type, generate the tokens that should
be printed before the type's name.
+
:param type: Type to print
:param platform: Platform responsible for this type
:param base_confidence: Confidence to use for tokens created for this type
@@ -330,6 +332,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
"""
In a single-line text representation of a type, generate the tokens that should
be printed after the type's name.
+
:param type: Type to print
:param platform: Platform responsible for this type
:param base_confidence: Confidence to use for tokens created for this type
@@ -342,6 +345,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
def get_type_string(self, type: types.Type, platform: Optional[_platform.Platform] = None, name: types.QualifiedNameType = "", escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
"""
Generate a single-line text representation of a type
+
:param type: Type to print
:param platform: Platform responsible for this type
:param name: Name of the type
@@ -354,6 +358,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
"""
In a single-line text representation of a type, generate the string that should
be printed before the type's name.
+
:param type: Type to print
:param platform: Platform responsible for this type
:param escaping: Style of escaping literals which may not be parsable
@@ -365,6 +370,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
"""
In a single-line text representation of a type, generate the string that should
be printed after the type's name.
+
:param type: Type to print
:param platform: Platform responsible for this type
:param escaping: Style of escaping literals which may not be parsable
@@ -375,6 +381,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
def get_type_lines(self, type: types.Type, data: binaryview.BinaryView, name: types.QualifiedNameType, line_width = 80, collapsed = False, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> List[types.TypeDefinitionLine]:
"""
Generate a multi-line representation of a type
+
:param type: Type to print
:param data: Binary View in which the type is defined
:param name: Name of the type
@@ -388,6 +395,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
def print_all_types(self, types: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, line_width = 80, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
"""
Print all types to a single big string, including headers, sections, etc
+
:param types: All types to print
:param data: Binary View in which all the types are defined
:param line_width: Maximum width of lines, in characters
diff --git a/python/types.py b/python/types.py
index 51f71c90..4c1eb3ab 100644
--- a/python/types.py
+++ b/python/types.py
@@ -589,6 +589,7 @@ class TypeBuilder:
) -> 'IntegerBuilder':
"""
``int`` class method for creating an int Type.
+
:param int width: width of the integer in bytes
:param bool sign: optional variable representing signedness
:param str altname: alternate name for type
@@ -599,6 +600,7 @@ class TypeBuilder:
def float(width: _int, altname: str = "") -> 'FloatBuilder':
"""
``float`` class method for creating floating point Types.
+
:param int width: width of the floating point number in bytes
:param str altname: alternate name for type
"""
@@ -608,6 +610,7 @@ class TypeBuilder:
def wide_char(width: _int, altname: str = "") -> 'WideCharBuilder':
"""
``wide_char`` class method for creating wide char Types.
+
:param int width: width of the wide character in bytes
:param str altname: alternate name for type
"""
@@ -660,6 +663,7 @@ class TypeBuilder:
) -> 'FunctionBuilder':
"""
``function`` class method for creating a function Type.
+
:param Type ret: return Type of the function
:param params: list of parameter Types
:type params: list(Type)
@@ -1968,6 +1972,7 @@ class Type:
def int(width: _int, sign: BoolWithConfidenceType = True, alternate_name: str = "") -> 'IntegerType':
"""
``int`` class method for creating an int Type.
+
:param int width: width of the integer in bytes
:param bool sign: optional variable representing signedness
:param str alternate_name: alternate name for type
@@ -1978,6 +1983,7 @@ class Type:
def float(width: _int, alternate_name: str = "") -> 'FloatType':
"""
``float`` class method for creating floating point Types.
+
:param int width: width of the floating point number in bytes
:param str alternate_name: alternate name for type
"""
@@ -1987,6 +1993,7 @@ class Type:
def wide_char(width: _int, alternate_name: str = "") -> 'WideCharType':
"""
``wide_char`` class method for creating wide char Types.
+
:param int width: width of the wide character in bytes
:param str alternate_name: alternate name for type
"""
@@ -2061,6 +2068,7 @@ class Type:
) -> 'FunctionType':
"""
``function`` class method for creating a function Type.
+
:param Type ret: return Type of the function
:param params: list of parameter Types
:type params: list(Type)