summaryrefslogtreecommitdiff
path: root/libmat2
diff options
context:
space:
mode:
authorjvoisin2019-05-09 09:41:05 +0200
committerjvoisin2019-05-09 09:41:05 +0200
commit97abafdc5824936c3a72136c3f398eb3dbdfec3c (patch)
tree753dbb54472f737614399d4d40cf95583ab96ad4 /libmat2
parentf1a06e805b824cf366af43d51bec2b92b5cefdc8 (diff)
Minor code cleanup
Diffstat (limited to 'libmat2')
-rw-r--r--libmat2/abstract.py6
-rw-r--r--libmat2/parser_factory.py5
2 files changed, 4 insertions, 7 deletions
diff --git a/libmat2/abstract.py b/libmat2/abstract.py
index a7c5fa5..8861966 100644
--- a/libmat2/abstract.py
+++ b/libmat2/abstract.py
@@ -35,12 +35,12 @@ class AbstractParser(abc.ABC):
35 35
36 @abc.abstractmethod 36 @abc.abstractmethod
37 def get_meta(self) -> Dict[str, Union[str, dict]]: 37 def get_meta(self) -> Dict[str, Union[str, dict]]:
38 pass # pragma: no cover 38 """Return all the metadata of the current file"""
39 39
40 @abc.abstractmethod 40 @abc.abstractmethod
41 def remove_all(self) -> bool: 41 def remove_all(self) -> bool:
42 """ 42 """
43 Remove all the metadata of the current file
44
43 :raises RuntimeError: Raised if the cleaning process went wrong. 45 :raises RuntimeError: Raised if the cleaning process went wrong.
44 """ 46 """
45 # pylint: disable=unnecessary-pass
46 pass # pragma: no cover
diff --git a/libmat2/parser_factory.py b/libmat2/parser_factory.py
index 2168fca..6150b26 100644
--- a/libmat2/parser_factory.py
+++ b/libmat2/parser_factory.py
@@ -7,13 +7,10 @@ from typing import TypeVar, List, Tuple, Optional
7 7
8from . import abstract, UNSUPPORTED_EXTENSIONS 8from . import abstract, UNSUPPORTED_EXTENSIONS
9 9
10assert Tuple # make pyflakes happy
11
12T = TypeVar('T', bound='abstract.AbstractParser') 10T = TypeVar('T', bound='abstract.AbstractParser')
13 11
14mimetypes.add_type('application/epub+zip', '.epub') 12mimetypes.add_type('application/epub+zip', '.epub')
15# EPUB Navigation Control XML File 13mimetypes.add_type('application/x-dtbncx+xml', '.ncx') # EPUB Navigation Control XML File
16mimetypes.add_type('application/x-dtbncx+xml', '.ncx')
17 14
18 15
19def __load_all_parsers(): 16def __load_all_parsers():