diff --git a/capa/features/extractors/pefile.py b/capa/features/extractors/pefile.py index 0d4a5243..b1727574 100644 --- a/capa/features/extractors/pefile.py +++ b/capa/features/extractors/pefile.py @@ -14,9 +14,8 @@ import capa.features.extractors import capa.features.extractors.helpers import capa.features.extractors.strings from capa.features.file import Export, Import, Section -from capa.features.common import String, Characteristic +from capa.features.common import CHARACTERISTIC_PE, CHARACTERISTIC_WINDOWS, String, Characteristic from capa.features.extractors.base_extractor import FeatureExtractor -from capa.features.common import CHARACTERISTIC_WINDOWS, CHARACTERISTIC_PE logger = logging.getLogger(__name__) diff --git a/capa/rules.py b/capa/rules.py index e3264998..8e6267bf 100644 --- a/capa/rules.py +++ b/capa/rules.py @@ -34,10 +34,15 @@ import capa.features.insn import capa.features.common import capa.features.basicblock from capa.engine import Statement, FeatureSet -from capa.features.common import MAX_BYTES_FEATURE_SIZE, Feature -from capa.features.common import CHARACTERISTIC_WINDOWS, CHARACTERISTIC_LINUX, CHARACTERISTIC_MACOS -from capa.features.common import CHARACTERISTIC_PE, CHARACTERISTIC_ELF - +from capa.features.common import ( + CHARACTERISTIC_PE, + CHARACTERISTIC_ELF, + CHARACTERISTIC_LINUX, + CHARACTERISTIC_MACOS, + CHARACTERISTIC_WINDOWS, + MAX_BYTES_FEATURE_SIZE, + Feature, +) logger = logging.getLogger(__name__) diff --git a/tests/fixtures.py b/tests/fixtures.py index 3e8f1b08..3bf065f0 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -21,8 +21,14 @@ import capa.features.file import capa.features.insn import capa.features.common import capa.features.basicblock -from capa.features.common import ARCH_X32, ARCH_X64 -from capa.features.common import CHARACTERISTIC_WINDOWS, CHARACTERISTIC_LINUX, CHARACTERISTIC_PE, CHARACTERISTIC_ELF +from capa.features.common import ( + ARCH_X32, + ARCH_X64, + CHARACTERISTIC_PE, + CHARACTERISTIC_ELF, + CHARACTERISTIC_LINUX, + CHARACTERISTIC_WINDOWS, +) CD = os.path.dirname(__file__) diff --git a/tests/test_rules.py b/tests/test_rules.py index 022292ca..95a39fb1 100644 --- a/tests/test_rules.py +++ b/tests/test_rules.py @@ -15,7 +15,16 @@ import capa.engine import capa.features.common from capa.features.file import FunctionName from capa.features.insn import Number, Offset -from capa.features.common import ARCH_X32, ARCH_X64, CHARACTERISTIC_PE, CHARACTERISTIC_WINDOWS, OS_WINDOWS, FORMAT_PE, String, Characteristic +from capa.features.common import ( + ARCH_X32, + ARCH_X64, + FORMAT_PE, + OS_WINDOWS, + CHARACTERISTIC_PE, + CHARACTERISTIC_WINDOWS, + String, + Characteristic, +) def test_rule_ctor(): @@ -979,4 +988,4 @@ def test_format_features(): r = capa.rules.Rule.from_yaml(rule) children = list(r.statement.get_children()) assert (CHARACTERISTIC_PE in children) == True - assert (CHARACTERISTIC_ELF not in children) == True \ No newline at end of file + assert (CHARACTERISTIC_ELF not in children) == True