From e28de9292b4c6e15a12ffbbc5eac89858a4d4b4f Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Tue, 14 Jul 2020 11:32:17 -0600 Subject: [PATCH] features: characteristic: simplify freeze closes #65 --- capa/features/__init__.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/capa/features/__init__.py b/capa/features/__init__.py index 860ca8cc..5c22b376 100644 --- a/capa/features/__init__.py +++ b/capa/features/__init__.py @@ -71,19 +71,6 @@ class Characteristic(Feature): def __init__(self, value, description=None): super(Characteristic, self).__init__(value, description) - def freeze_serialize(self): - # in an older version of capa, characteristics could theoretically match non-existence (value=False). - # but we found this was never used (and better expressed with `not: characteristic: ...`). - # this was represented using an additional parameter for Characteristic. - # its been removed, but we keep it around in the freeze format to maintain backwards compatibility. - # this value is ignored, however. - return (self.__class__.__name__, [self.value, True]) - - @classmethod - def freeze_deserialize(cls, args): - # see above. we ignore the second element in the 2-tuple here. - return cls(args[0]) - class String(Feature): def __init__(self, value, description=None):