From 301b10d261620adc857880de8b2c22c5a8e3a996 Mon Sep 17 00:00:00 2001 From: Yacine Elhamer Date: Thu, 20 Jul 2023 10:52:43 +0100 Subject: [PATCH] fix style issues --- capa/helpers.py | 1 - scripts/show-features.py | 4 ++-- tests/fixtures.py | 1 + tests/test_cape_features.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/capa/helpers.py b/capa/helpers.py index 982508c3..3f86aace 100644 --- a/capa/helpers.py +++ b/capa/helpers.py @@ -5,7 +5,6 @@ # Unless required by applicable law or agreed to in writing, software distributed under the License # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and limitations under the License. -import os import json import inspect import logging diff --git a/scripts/show-features.py b/scripts/show-features.py index 129cb3c3..3101ab13 100644 --- a/scripts/show-features.py +++ b/scripts/show-features.py @@ -83,7 +83,7 @@ import capa.features.address import capa.features.extractors.pefile from capa.helpers import get_auto_format, log_unsupported_runtime_error from capa.features.common import FORMAT_AUTO, FORMAT_FREEZE, DYNAMIC_FORMATS, is_global_feature -from capa.features.extractors.base_extractor import FeatureExtractor, StaticFeatureExtractor, DynamicFeatureExtractor, FunctionHandle +from capa.features.extractors.base_extractor import FunctionHandle, StaticFeatureExtractor, DynamicFeatureExtractor logger = logging.getLogger("capa.show-features") @@ -109,7 +109,7 @@ def main(argv=None): return -1 try: - taste = capa.helpers.get_file_taste(Path(args.sample)) + _ = capa.helpers.get_file_taste(Path(args.sample)) except IOError as e: logger.error("%s", str(e)) return -1 diff --git a/tests/fixtures.py b/tests/fixtures.py index e566f5b3..4a4b1044 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -6,6 +6,7 @@ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and limitations under the License. +import os import binascii import contextlib import collections diff --git a/tests/test_cape_features.py b/tests/test_cape_features.py index f1a29aba..8501aac9 100644 --- a/tests/test_cape_features.py +++ b/tests/test_cape_features.py @@ -6,7 +6,6 @@ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and limitations under the License. import fixtures -from fixtures import scope, sample @fixtures.parametrize(