From ffbf73a3728a168a0ac98921551086c4b67fbc5a Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Sun, 16 Jul 2023 13:01:09 -0700 Subject: [PATCH] Resolve circular import --- melamine/filesystems/ext23.py | 4 +--- melamine/filesystems/zfs.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/melamine/filesystems/ext23.py b/melamine/filesystems/ext23.py index e8d38b4..5226f57 100644 --- a/melamine/filesystems/ext23.py +++ b/melamine/filesystems/ext23.py @@ -3,8 +3,6 @@ from collections.abc import Generator from aiopath import Path -from melamine.classes import AsyncObject - class ext2_filsys(ctypes.Structure): pass @@ -57,7 +55,7 @@ class EXT23Handler: self.libext2fs.ext2fs_get_next_inode.argtypes = [ext2_inode_scan, ext2_inode_large_p] self.libext2fs.ext2fs_get_next_inode.restype = ctypes.c_int - async def get_hardlinks(self, path: AsyncObject) -> Generator: + async def get_hardlinks(self, path) -> Generator: fs = ext2_filsys() if self.libext2fs.ext2fs_open(bytes(path.absolute_path), 0, 0, 0, ctypes.byref(fs)) == 0: try: diff --git a/melamine/filesystems/zfs.py b/melamine/filesystems/zfs.py index 866681c..1663421 100644 --- a/melamine/filesystems/zfs.py +++ b/melamine/filesystems/zfs.py @@ -3,14 +3,12 @@ from collections.abc import Generator import libzfs from aiopath import Path -from melamine.classes import AsyncObject - class ZFSHandler: def __init__(self) -> None: self.fs = "zfs" - async def get_hardlinks(self, path: AsyncObject) -> Generator: + async def get_hardlinks(self, path) -> Generator: path_str = str(path.absolute_path) zfs = libzfs.ZFS()