*: remove explicit object super class

closes #635
This commit is contained in:
William Ballenthin
2021-06-14 08:47:09 -06:00
parent 247d330f79
commit 83909b2be4
6 changed files with 9 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ import capa.features.common
from capa.features.common import Feature
class Statement(object):
class Statement:
"""
superclass for structural nodes, such as and/or/not.
this exists to provide a default impl for `__str__` and `__repr__`,
@@ -69,7 +69,7 @@ class Statement(object):
self.children[i] = new
class Result(object):
class Result:
"""
represents the results of an evaluation of statements against features.

View File

@@ -54,7 +54,7 @@ def escape_string(s: str) -> str:
return s
class Feature(object):
class Feature:
def __init__(self, value: Union[str, int, bytes], arch=None, description=None):
"""
Args:
@@ -228,7 +228,7 @@ class _MatchedRegex(Regex):
)
class StringFactory(object):
class StringFactory:
def __new__(cls, value: str, description=None):
if value.startswith("/") and (value.endswith("/") or value.endswith("/i")):
return Regex(value, description=description)

View File

@@ -26,7 +26,7 @@ BBHandle = SupportsInt
InsnHandle = SupportsInt
class FeatureExtractor(object):
class FeatureExtractor:
"""
FeatureExtractor defines the interface for fetching features from a sample.

View File

@@ -31,7 +31,7 @@ def location_to_hex(location):
return "%08X" % location
class CapaExplorerDataItem(object):
class CapaExplorerDataItem:
"""store data for CapaExplorerDataModel"""
def __init__(self, parent, data, can_check=True):

View File

@@ -429,7 +429,7 @@ def second(s: List[Any]) -> Any:
return s[1]
class Rule(object):
class Rule:
def __init__(self, name, scope, statement, meta, definition=""):
super(Rule, self).__init__()
self.name = name
@@ -863,7 +863,7 @@ def topologically_order_rules(rules: List[Rule]) -> List[Rule]:
return ret
class RuleSet(object):
class RuleSet:
"""
a ruleset is initialized with a collection of rules, which it verifies and sorts into scopes.
each set of scoped rules is sorted topologically, which enables rules to match on past rule matches.

View File

@@ -49,7 +49,7 @@ def green(s):
return termcolor.colored(s, "green")
class Lint(object):
class Lint:
WARN = orange("WARN")
FAIL = red("FAIL")