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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
tails
mat2
Commits
3e2890eb
Commit
3e2890eb
authored
6 years ago
by
dkg
Committed by
jvoisin
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
three minor spelling fixes
parent
91e80527
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/implementation_notes.md
+1
-1
1 addition, 1 deletion
doc/implementation_notes.md
libmat2/abstract.py
+2
-2
2 additions, 2 deletions
libmat2/abstract.py
mat2
+2
-2
2 additions, 2 deletions
mat2
with
5 additions
and
5 deletions
doc/implementation_notes.md
+
1
−
1
View file @
3e2890eb
...
@@ -6,7 +6,7 @@ Lightweight cleaning mode
...
@@ -6,7 +6,7 @@ Lightweight cleaning mode
Due to
*popular*
request, MAT2 is providing a
*lightweight*
cleaning mode,
Due to
*popular*
request, MAT2 is providing a
*lightweight*
cleaning mode,
that only cleans the superficial metadata of your file, but not
that only cleans the superficial metadata of your file, but not
the ones that might be in
**embeded**
resources. Like for example,
the ones that might be in
**embed
d
ed**
resources. Like for example,
images in a PDF or an office document.
images in a PDF or an office document.
Revisions handling
Revisions handling
...
...
This diff is collapsed.
Click to expand it.
libmat2/abstract.py
+
2
−
2
View file @
3e2890eb
...
@@ -6,8 +6,8 @@ assert Set # make pyflakes happy
...
@@ -6,8 +6,8 @@ assert Set # make pyflakes happy
class
AbstractParser
(
abc
.
ABC
):
class
AbstractParser
(
abc
.
ABC
):
"""
This is the base class
e
of every parser.
"""
This is the base class of every parser.
It might yield `ValueError` on instan
c
iation on invalid files.
It might yield `ValueError` on instan
t
iation on invalid files.
"""
"""
meta_list
=
set
()
# type: Set[str]
meta_list
=
set
()
# type: Set[str]
mimetypes
=
set
()
# type: Set[str]
mimetypes
=
set
()
# type: Set[str]
...
...
This diff is collapsed.
Click to expand it.
mat2
+
2
−
2
View file @
3e2890eb
...
@@ -68,7 +68,7 @@ def show_meta(filename: str):
...
@@ -68,7 +68,7 @@ def show_meta(filename: str):
print
(
"
%s: harmful content
"
%
k
)
print
(
"
%s: harmful content
"
%
k
)
def
clean_meta
(
params
:
Tuple
[
str
,
bool
])
->
bool
:
def
clean_meta
(
params
:
Tuple
[
str
,
bool
])
->
bool
:
filename
,
is_lightweig
t
h
=
params
filename
,
is_lightweigh
t
=
params
if
not
__check_file
(
filename
,
os
.
R_OK
|
os
.
W_OK
):
if
not
__check_file
(
filename
,
os
.
R_OK
|
os
.
W_OK
):
return
False
return
False
...
@@ -76,7 +76,7 @@ def clean_meta(params: Tuple[str, bool]) -> bool:
...
@@ -76,7 +76,7 @@ def clean_meta(params: Tuple[str, bool]) -> bool:
if
p
is
None
:
if
p
is
None
:
print
(
"
[-] %s
'
s format (%s) is not supported
"
%
(
filename
,
mtype
))
print
(
"
[-] %s
'
s format (%s) is not supported
"
%
(
filename
,
mtype
))
return
False
return
False
if
is_lightweig
t
h
:
if
is_lightweigh
t
:
return
p
.
remove_all_lightweight
()
return
p
.
remove_all_lightweight
()
return
p
.
remove_all
()
return
p
.
remove_all
()
...
...
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