Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvoisin
mat2
Commits
97abafdc
Commit
97abafdc
authored
5 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Minor code cleanup
parent
f1a06e80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libmat2/abstract.py
+3
-3
3 additions, 3 deletions
libmat2/abstract.py
libmat2/parser_factory.py
+1
-4
1 addition, 4 deletions
libmat2/parser_factory.py
with
4 additions
and
7 deletions
libmat2/abstract.py
+
3
−
3
View file @
97abafdc
...
@@ -35,12 +35,12 @@ class AbstractParser(abc.ABC):
...
@@ -35,12 +35,12 @@ class AbstractParser(abc.ABC):
@abc.abstractmethod
@abc.abstractmethod
def
get_meta
(
self
)
->
Dict
[
str
,
Union
[
str
,
dict
]]:
def
get_meta
(
self
)
->
Dict
[
str
,
Union
[
str
,
dict
]]:
pass
# pragma: no cover
"""
Return all the metadata of the current file
"""
@abc.abstractmethod
@abc.abstractmethod
def
remove_all
(
self
)
->
bool
:
def
remove_all
(
self
)
->
bool
:
"""
"""
Remove all the metadata of the current file
:raises RuntimeError: Raised if the cleaning process went wrong.
:raises RuntimeError: Raised if the cleaning process went wrong.
"""
"""
# pylint: disable=unnecessary-pass
pass
# pragma: no cover
This diff is collapsed.
Click to expand it.
libmat2/parser_factory.py
+
1
−
4
View file @
97abafdc
...
@@ -7,13 +7,10 @@ from typing import TypeVar, List, Tuple, Optional
...
@@ -7,13 +7,10 @@ from typing import TypeVar, List, Tuple, Optional
from
.
import
abstract
,
UNSUPPORTED_EXTENSIONS
from
.
import
abstract
,
UNSUPPORTED_EXTENSIONS
assert
Tuple
# make pyflakes happy
T
=
TypeVar
(
'
T
'
,
bound
=
'
abstract.AbstractParser
'
)
T
=
TypeVar
(
'
T
'
,
bound
=
'
abstract.AbstractParser
'
)
mimetypes
.
add_type
(
'
application/epub+zip
'
,
'
.epub
'
)
mimetypes
.
add_type
(
'
application/epub+zip
'
,
'
.epub
'
)
# EPUB Navigation Control XML File
mimetypes
.
add_type
(
'
application/x-dtbncx+xml
'
,
'
.ncx
'
)
# EPUB Navigation Control XML File
mimetypes
.
add_type
(
'
application/x-dtbncx+xml
'
,
'
.ncx
'
)
def
__load_all_parsers
():
def
__load_all_parsers
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment