File size: 620 Bytes
f9b37b2 |
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 |
import abc
from pathlib import Path
from typing import List, Tuple, Union, Optional, IO
from modelscan.error import Error
from modelscan.issues import Issue
class ScanBase(metaclass=abc.ABCMeta):
@staticmethod
@abc.abstractmethod
def name() -> str:
raise NotImplementedError
@staticmethod
@abc.abstractmethod
def scan(
source: Union[str, Path], data: Optional[IO[bytes]] = None
) -> Tuple[List[Issue], List[Error]]:
raise NotImplementedError
@staticmethod
@abc.abstractmethod
def supported_extensions() -> List[str]:
raise NotImplementedError
|