mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-27 20:14:51 +02:00
Add type-annotations for reamining layer files.
This commit is contained in:
@@ -73,7 +73,7 @@ class Context(interfaces.context.ContextInterface):
|
||||
# ## Object Factory Functions
|
||||
|
||||
def object(self,
|
||||
symbol: str,
|
||||
symbol: typing.Union[str, interfaces.objects.Template],
|
||||
layer_name: str,
|
||||
offset: int,
|
||||
**arguments) -> interfaces.objects.ObjectInterface:
|
||||
@@ -91,9 +91,10 @@ class Context(interfaces.context.ContextInterface):
|
||||
:return: A fully constructed object
|
||||
:rtype: :py:class:`volatility.framework.interfaces.objects.ObjectInterface`
|
||||
"""
|
||||
object_template = self.symbol_space.get_type(symbol)
|
||||
if not isinstance(symbol, interfaces.objects.Template):
|
||||
object_template = self._symbol_space.get_type(symbol)
|
||||
else:
|
||||
object_template = symbol
|
||||
object_template = object_template.clone()
|
||||
object_template.update_vol(**arguments)
|
||||
return object_template(context = self,
|
||||
|
||||
Reference in New Issue
Block a user