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
3378f3ab
Commit
3378f3ab
authored
3 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Please pylint by iterating on dict directly, instead of calling .keys()
parent
48680b98
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#72504
failed
3 years ago
Stage: linting
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libmat2/office.py
+5
-5
5 additions, 5 deletions
libmat2/office.py
with
5 additions
and
5 deletions
libmat2/office.py
+
5
−
5
View file @
3378f3ab
...
...
@@ -179,7 +179,7 @@ class MSOfficeParser(ZipParser):
return
False
# rsid, tags or attributes, are always under the `w` namespace
if
'
w
'
not
in
namespace
.
keys
()
:
if
'
w
'
not
in
namespace
:
return
True
parent_map
=
{
c
:
p
for
p
in
tree
.
iter
()
for
c
in
p
}
...
...
@@ -215,7 +215,7 @@ class MSOfficeParser(ZipParser):
return
False
# The nsid tag is always under the `w` namespace
if
'
w
'
not
in
namespace
.
keys
()
:
if
'
w
'
not
in
namespace
:
return
True
parent_map
=
{
c
:
p
for
p
in
tree
.
iter
()
for
c
in
p
}
...
...
@@ -328,7 +328,7 @@ class MSOfficeParser(ZipParser):
logging
.
error
(
"
Unable to parse %s: %s
"
,
full_path
,
e
)
return
False
if
'
p14
'
not
in
namespace
.
keys
()
:
if
'
p14
'
not
in
namespace
:
return
True
# pragma: no cover
for
item
in
tree
.
iterfind
(
'
.//p14:creationId
'
,
namespace
):
...
...
@@ -344,7 +344,7 @@ class MSOfficeParser(ZipParser):
logging
.
error
(
"
Unable to parse %s: %s
"
,
full_path
,
e
)
return
False
if
'
p
'
not
in
namespace
.
keys
()
:
if
'
p
'
not
in
namespace
:
return
True
# pragma: no cover
for
item
in
tree
.
iterfind
(
'
.//p:sldMasterId
'
,
namespace
):
...
...
@@ -486,7 +486,7 @@ class LibreOfficeParser(ZipParser):
logging
.
error
(
"
Unable to parse %s: %s
"
,
full_path
,
e
)
return
False
if
'
office
'
not
in
namespace
.
keys
()
:
# no revisions in the current file
if
'
office
'
not
in
namespace
:
# no revisions in the current file
return
True
for
text
in
tree
.
getroot
().
iterfind
(
'
.//office:text
'
,
namespace
):
...
...
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