summaryrefslogtreecommitdiff
path: root/libmat2/abstract.py
diff options
context:
space:
mode:
authorjvoisin2018-10-12 11:49:24 +0200
committerjvoisin2018-10-12 11:49:24 +0200
commitb832a5941458083dd6147efb652036552f95b786 (patch)
treee9a844f329b668a307772499740adbb1dc24e903 /libmat2/abstract.py
parent6ce88b8b7f3f10d70b2fb890ed4970e7282a43b5 (diff)
Refactor lightweight mode implementation
Diffstat (limited to 'libmat2/abstract.py')
-rw-r--r--libmat2/abstract.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/libmat2/abstract.py b/libmat2/abstract.py
index cd72f2c..5bcaa69 100644
--- a/libmat2/abstract.py
+++ b/libmat2/abstract.py
@@ -19,6 +19,7 @@ class AbstractParser(abc.ABC):
19 self.filename = filename 19 self.filename = filename
20 fname, extension = os.path.splitext(filename) 20 fname, extension = os.path.splitext(filename)
21 self.output_filename = fname + '.cleaned' + extension 21 self.output_filename = fname + '.cleaned' + extension
22 self.lightweight_cleaning = False
22 23
23 @abc.abstractmethod 24 @abc.abstractmethod
24 def get_meta(self) -> Dict[str, str]: 25 def get_meta(self) -> Dict[str, str]:
@@ -27,10 +28,3 @@ class AbstractParser(abc.ABC):
27 @abc.abstractmethod 28 @abc.abstractmethod
28 def remove_all(self) -> bool: 29 def remove_all(self) -> bool:
29 pass # pragma: no cover 30 pass # pragma: no cover
30
31 def remove_all_lightweight(self) -> bool:
32 """ This method removes _SOME_ metadata.
33 It might be useful to implement it for fileformats that do
34 not support non-destructive cleaning.
35 """
36 return self.remove_all()