Skip to content

Commit

Permalink
Merge pull request #1630 from mandiant/fix/issue-1629
Browse files Browse the repository at this point in the history
fix binja test type error
  • Loading branch information
williballenthin committed Jul 13, 2023
2 parents f897f00 + acaf6c1 commit ad6b475
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions capa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import itertools
import contextlib
import collections
from typing import Any, Dict, List, Tuple, Callable
from typing import Any, Dict, List, Tuple, Callable, Optional
from pathlib import Path

import halo
Expand Down Expand Up @@ -1060,7 +1060,7 @@ def handle_common_args(args):
args.signatures = sigs_path


def main(argv=None):
def main(argv: Optional[List[str]] = None):
if sys.version_info < (3, 8):
raise UnsupportedRuntimeError("This version of capa can only be used with Python 3.8+")

Expand Down
2 changes: 1 addition & 1 deletion tests/test_binja_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_binja_feature_counts(sample, scope, feature, expected):
def test_standalone_binja_backend():
CD = Path(__file__).resolve().parent
test_path = CD / ".." / "tests" / "data" / "Practical Malware Analysis Lab 01-01.exe_"
assert capa.main.main([test_path, "-b", capa.main.BACKEND_BINJA]) == 0
assert capa.main.main([str(test_path), "-b", capa.main.BACKEND_BINJA]) == 0


@pytest.mark.skipif(binja_present is False, reason="Skip binja tests if the binaryninja Python API is not installed")
Expand Down

0 comments on commit ad6b475

Please sign in to comment.