mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 12:47:39 +02:00
Finish adding type-annotations thoughout the code.
This commit is contained in:
@@ -19,7 +19,7 @@ class ReadOnlyMapping(validity.ValidityRoutines, collections.abc.Mapping):
|
||||
This ensures that the data stored in the mapping should not be modified, making an immutable mapping.
|
||||
"""
|
||||
|
||||
def __init__(self, dictionary: typing.ChainMap[str, typing.Any]) -> None:
|
||||
def __init__(self, dictionary: typing.Mapping[str, typing.Any]) -> None:
|
||||
self._dict = dictionary
|
||||
|
||||
def __getattr__(self, attr: str) -> typing.Any:
|
||||
|
||||
@@ -174,14 +174,14 @@ class BaseSymbolTableInterface(validity.ValidityRoutines):
|
||||
|
||||
# ## Functions for overriding classes
|
||||
|
||||
def set_type_class(self, name: str, clazz: objects.ObjectInterface) -> None:
|
||||
def set_type_class(self, name: str, clazz: typing.Type[objects.ObjectInterface]) -> None:
|
||||
"""Overrides the object class for a specific Symbol type
|
||||
|
||||
Name *must* be present in self.types
|
||||
"""
|
||||
raise NotImplementedError("Abstract method set_type_class not implemented yet.")
|
||||
|
||||
def get_type_class(self, name: str) -> objects.ObjectInterface:
|
||||
def get_type_class(self, name: str) -> typing.Type[objects.ObjectInterface]:
|
||||
"""Returns the class associated with a Symbol type"""
|
||||
raise NotImplementedError("Abstract method get_type_class not implemented yet.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user