1
0
mirror of synced 2024-11-22 09:14:23 +01:00

AbstractParser is an abstract class

This commit is contained in:
jvoisin 2018-04-01 12:06:50 +02:00
parent da5cef8c90
commit 711347c87f

View File

@ -1,4 +1,6 @@
class AbstractParser(object):
import abc
class AbstractParser(abc.ABC):
meta_list = set()
mimetypes = set()
@ -6,8 +8,10 @@ class AbstractParser(object):
self.filename = filename
self.output_filename = filename + '.cleaned'
@abc.abstractmethod
def get_meta(self) -> dict:
raise NotImplementedError
pass
@abc.abstractmethod
def remove_all(self) -> bool:
raise NotImplementedError
pass