diff options
| author | jvoisin | 2019-05-09 09:41:05 +0200 |
|---|---|---|
| committer | jvoisin | 2019-05-09 09:41:05 +0200 |
| commit | 97abafdc5824936c3a72136c3f398eb3dbdfec3c (patch) | |
| tree | 753dbb54472f737614399d4d40cf95583ab96ad4 | |
| parent | f1a06e805b824cf366af43d51bec2b92b5cefdc8 (diff) | |
Minor code cleanup
| -rw-r--r-- | libmat2/abstract.py | 6 | ||||
| -rw-r--r-- | libmat2/parser_factory.py | 5 |
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 | ||
| 8 | from . import abstract, UNSUPPORTED_EXTENSIONS | 8 | from . import abstract, UNSUPPORTED_EXTENSIONS |
| 9 | 9 | ||
| 10 | assert Tuple # make pyflakes happy | ||
| 11 | |||
| 12 | T = TypeVar('T', bound='abstract.AbstractParser') | 10 | T = TypeVar('T', bound='abstract.AbstractParser') |
| 13 | 11 | ||
| 14 | mimetypes.add_type('application/epub+zip', '.epub') | 12 | mimetypes.add_type('application/epub+zip', '.epub') |
| 15 | # EPUB Navigation Control XML File | 13 | mimetypes.add_type('application/x-dtbncx+xml', '.ncx') # EPUB Navigation Control XML File |
| 16 | mimetypes.add_type('application/x-dtbncx+xml', '.ncx') | ||
| 17 | 14 | ||
| 18 | 15 | ||
| 19 | def __load_all_parsers(): | 16 | def __load_all_parsers(): |
