From 97abafdc5824936c3a72136c3f398eb3dbdfec3c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 9 May 2019 09:41:05 +0200 Subject: [PATCH] Minor code cleanup --- libmat2/abstract.py | 6 +++--- 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): @abc.abstractmethod def get_meta(self) -> Dict[str, Union[str, dict]]: - pass # pragma: no cover + """Return all the metadata of the current file""" @abc.abstractmethod def remove_all(self) -> bool: """ + Remove all the metadata of the current file + :raises RuntimeError: Raised if the cleaning process went wrong. """ - # pylint: disable=unnecessary-pass - 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 from . import abstract, UNSUPPORTED_EXTENSIONS -assert Tuple # make pyflakes happy - T = TypeVar('T', bound='abstract.AbstractParser') mimetypes.add_type('application/epub+zip', '.epub') -# EPUB Navigation Control XML File -mimetypes.add_type('application/x-dtbncx+xml', '.ncx') +mimetypes.add_type('application/x-dtbncx+xml', '.ncx') # EPUB Navigation Control XML File def __load_all_parsers():