Skip to content

Commit

Permalink
Fix type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zawadidone committed Aug 15, 2023
1 parent 2c1b02a commit e18375b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dissect/target/helpers/loaderutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import Optional, Tuple, Union

from dissect.target.exceptions import FileNotFoundError
from dissect.target.filesystem import Filesystem
from dissect.target.filesystems.ntfs import NtfsFilesystem

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -41,7 +42,7 @@ def add_virtual_ntfs_filesystem(
fs.ntfs = ntfs.ntfs


def _try_open(fs, path) -> None:
def _try_open(fs: Filesystem, path: str) -> None:
paths = [path] if not isinstance(path, list) else path

for path in paths:
Expand Down
5 changes: 2 additions & 3 deletions tests/test_loaders_velociraptor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from pathlib import Path
from typing import List

import pytest

Expand Down Expand Up @@ -50,7 +49,7 @@
),
],
)
def test_velociraptor_loader_windows_ntfs(paths: List[str], mock_target: Target, tmp_path: Path) -> None:
def test_velociraptor_loader_windows_ntfs(paths: list[str], mock_target: Target, tmp_path: Path) -> None:
root = tmp_path
mkdirs(root, paths)

Expand Down Expand Up @@ -88,7 +87,7 @@ def test_velociraptor_loader_windows_ntfs(paths: List[str], mock_target: Target,
(["uploads.json", "uploads/auto/Library", "uploads/auto/Applications"]),
],
)
def test_dir_loader_unix(paths: List[str], mock_target: Target, tmp_path: Path) -> None:
def test_dir_loader_unix(paths: list[str], mock_target: Target, tmp_path: Path) -> None:
root = tmp_path
mkdirs(root, paths)

Expand Down

0 comments on commit e18375b

Please sign in to comment.