File size: 796 Bytes
71687cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | from __future__ import annotations
import abc
class AbstractBaseFormat(metaclass=abc.ABCMeta):
@staticmethod
@abc.abstractmethod
def supported(fn): # pragma: no cover
return False
@staticmethod
@abc.abstractmethod
def extract(fn, dest_dir, **kw): # pragma: no cover
raise NotImplementedError
@staticmethod
@abc.abstractmethod
def create(prefix, file_list, out_fn, out_folder: str | None = None, **kw): # pragma: no cover
raise NotImplementedError
@staticmethod
@abc.abstractmethod
def get_pkg_details(in_file): # pragma: no cover
raise NotImplementedError
@staticmethod
@abc.abstractmethod
def list_contents(in_file, verbose=False, **kw): # pragma: no cover
raise NotImplementedError
|