From f879f53a6b5c53b663a8e4c4a58eb25eabc6f2b2 Mon Sep 17 00:00:00 2001 From: Yacine Elhamer Date: Tue, 11 Jul 2023 12:33:37 +0100 Subject: [PATCH] fix linting issues --- CHANGELOG.md | 3 --- capa/features/extractors/cape/extractor.py | 4 ++-- capa/features/extractors/cape/process.py | 2 +- capa/features/freeze/__init__.py | 2 +- tests/test_static_freeze.py | 1 - 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d28f23d..4f6e1c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,14 +10,11 @@ - Add a CAPE file format and CAPE-based dynamic feature extraction to scripts/show-features.py #1566 @yelhamer - Add a new process scope for the dynamic analysis flavor #1517 @yelhamer - Add a new thread scope for the dynamic analysis flavor #1517 @yelhamer -<<<<<<< HEAD - use fancy box drawing characters for default output #1586 @williballenthin - use [pre-commit](https://pre-commit.com/) to invoke linters #1579 @williballenthin - publish via PyPI trusted publishing #1491 @williballenthin - migrate to pyproject.toml #1301 @williballenthin -======= - Add ProcessesAddress and ThreadAddress #1612 @yelhamer ->>>>>>> 64a16314abef9647f1729a4b5c3e2c21c41e1f9f ### Breaking Changes - Update Metadata type in capa main [#1411](https://github.com/mandiant/capa/issues/1411) [@Aayush-Goel-04](https://github.com/aayush-goel-04) @manasghandat diff --git a/capa/features/extractors/cape/extractor.py b/capa/features/extractors/cape/extractor.py index 5cf00484..48bf2a57 100644 --- a/capa/features/extractors/cape/extractor.py +++ b/capa/features/extractors/cape/extractor.py @@ -6,14 +6,14 @@ # 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 logging -from typing import Dict, Tuple, Iterator +from typing import Dict, Tuple, Union, Iterator import capa.features.extractors.cape.file import capa.features.extractors.cape.thread import capa.features.extractors.cape.global_ import capa.features.extractors.cape.process from capa.features.common import Feature -from capa.features.address import NO_ADDRESS, Address, AbsoluteVirtualAddress, _NoAddress +from capa.features.address import Address, AbsoluteVirtualAddress, _NoAddress from capa.features.extractors.base_extractor import ThreadHandle, ProcessHandle, DynamicFeatureExtractor logger = logging.getLogger(__name__) diff --git a/capa/features/extractors/cape/process.py b/capa/features/extractors/cape/process.py index f384e1d6..ecd78a32 100644 --- a/capa/features/extractors/cape/process.py +++ b/capa/features/extractors/cape/process.py @@ -13,7 +13,7 @@ import capa.features.extractors.cape.thread import capa.features.extractors.cape.global_ import capa.features.extractors.cape.process from capa.features.common import String, Feature -from capa.features.address import NO_ADDRESS, Address, ThreadAddress +from capa.features.address import Address, ThreadAddress from capa.features.extractors.base_extractor import ThreadHandle, ProcessHandle logger = logging.getLogger(__name__) diff --git a/capa/features/freeze/__init__.py b/capa/features/freeze/__init__.py index 39bf9415..8f0c9310 100644 --- a/capa/features/freeze/__init__.py +++ b/capa/features/freeze/__init__.py @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations import zlib import logging from enum import Enum -from typing import Any, List, Tuple, Union, TypeAlias +from typing import List, Tuple, Union, TypeAlias from pydantic import Field, BaseModel diff --git a/tests/test_static_freeze.py b/tests/test_static_freeze.py index 60a806a1..879f0dda 100644 --- a/tests/test_static_freeze.py +++ b/tests/test_static_freeze.py @@ -9,7 +9,6 @@ import textwrap from typing import List import pytest -from fixtures import z9324d_extractor import capa.main import capa.rules