base_extractor.py: replace dunder with single underscore for sample_hashes attribute

This commit is contained in:
Yacine Elhamer
2023-08-25 10:14:25 +02:00
parent 707dee4c3f
commit 49bf2eb6d4

View File

@@ -113,7 +113,7 @@ class StaticFeatureExtractor:
# this base class doesn't know what to do with that info, though.
#
super().__init__()
self.__sample_hashes = hashes
self._sample_hashes = hashes
@abc.abstractmethod
def get_base_address(self) -> Union[AbsoluteVirtualAddress, capa.features.address._NoAddress]:
@@ -131,7 +131,7 @@ class StaticFeatureExtractor:
"""
fetch the hashes for the sample contained within the extractor.
"""
return self.__sample_hashes
return self._sample_hashes
@abc.abstractmethod
def extract_global_features(self) -> Iterator[Tuple[Feature, Address]]:
@@ -361,14 +361,14 @@ class DynamicFeatureExtractor:
# this base class doesn't know what to do with that info, though.
#
super().__init__()
self.__sample_hashes = hashes
self._sample_hashes = hashes
@abc.abstractmethod
def get_sample_hashes(self) -> SampleHashes:
"""
fetch the hashes for the sample contained within the extractor.
"""
return self.__sample_hashes
return self._sample_hashes
@abc.abstractmethod
def extract_global_features(self) -> Iterator[Tuple[Feature, Address]]: