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