Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
python-common
Commits
e58f57b7
Commit
e58f57b7
authored
8 years ago
by
Henning Glawe
Browse files
Options
Downloads
Patches
Plain Diff
remove special treatment of RE_EMPTY
instead, make RE_EMPTY the default/fallback for global coverageIgnore
parent
35f1b23e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/python/nomadcore/annotator.py
+3
-7
3 additions, 7 deletions
common/python/nomadcore/annotator.py
with
3 additions
and
7 deletions
common/python/nomadcore/annotator.py
+
3
−
7
View file @
e58f57b7
...
...
@@ -13,7 +13,8 @@ class Annotator(object):
def
__init__
(
self
,
annotateFilename
=
None
,
coverageIgnore
=
None
,
formatNameWidth
=
15
,
formatSourceWidth
=
20
):
self
.
matchHighlighter
=
MatchHighlighter
()
self
.
coverageIgnore
=
coverageIgnore
# ignore empty lines by default in coverage analysis
self
.
coverageIgnore
=
coverageIgnore
if
coverageIgnore
else
RE_EMPTY
if
annotateFilename
is
None
:
self
.
annotateFile
=
None
else
:
...
...
@@ -52,15 +53,10 @@ class Annotator(object):
elif
matcher
.
does_nothing
:
matcher_does_nothing
=
True
else
:
m2
=
RE_EMPTY
.
match
(
line
)
m2
=
self
.
coverageIgnore
.
match
(
line
)
if
m2
:
global_ignore
=
True
match
=
m2
elif
self
.
coverageIgnore
is
not
None
:
m2
=
self
.
coverageIgnore
.
match
(
line
)
if
m2
:
global_ignore
=
True
match
=
m2
# update counters
self
.
counter
[
'
total
'
]
+=
1
...
...
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