Add Symbol constructor type annotation and documentation

Fixes: d1ebf5e9fe ("python: Allow construction of Symbol objects")
Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
Omar Sandoval 2024-04-25 16:14:18 -07:00
parent c92786e477
commit 991e674d57

View File

@ -1608,6 +1608,24 @@ class Symbol:
identifier along with its corresponding address range in the program. identifier along with its corresponding address range in the program.
""" """
def __init__(
self,
name: str,
address: int,
size: int,
binding: SymbolBinding,
kind: SymbolKind,
) -> None:
"""
Create a ``Symbol``.
:param name: :attr:`Symbol.name`
:param address: :attr:`Symbol.address`
:param size: :attr:`Symbol.size`
:param binding: :attr:`Symbol.binding`
:param kind: :attr:`Symbol.kind`
"""
...
name: Final[str] name: Final[str]
"""Name of this symbol.""" """Name of this symbol."""