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
GitLab 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
f5d21487
Commit
f5d21487
authored
9 years ago
by
Henning Glawe
Browse files
Options
Downloads
Patches
Plain Diff
classify empty lines as 'ignored' unless explicitly matched
parent
e0b03f68
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/python/nomadcore/annotator.py
+5
-1
5 additions, 1 deletion
common/python/nomadcore/annotator.py
with
5 additions
and
1 deletion
common/python/nomadcore/annotator.py
+
5
−
1
View file @
f5d21487
import
logging
import
logging
import
re
from
nomadcore.match_highlighter
import
MatchHighlighter
,
ANSI
from
nomadcore.match_highlighter
import
MatchHighlighter
,
ANSI
LOGGER
=
logging
.
getLogger
(
__name__
)
LOGGER
=
logging
.
getLogger
(
__name__
)
RE_EMPTY
=
re
.
compile
(
r
"
^\s*$
"
)
class
Annotator
(
object
):
class
Annotator
(
object
):
def
__init__
(
self
,
annotateFilename
=
None
,
coverageIgnore
=
None
,
def
__init__
(
self
,
annotateFilename
=
None
,
coverageIgnore
=
None
,
formatNameWidth
=
15
,
formatSourceWidth
=
20
):
formatNameWidth
=
15
,
formatSourceWidth
=
20
):
...
@@ -38,7 +42,7 @@ class Annotator(object):
...
@@ -38,7 +42,7 @@ class Annotator(object):
return
1
return
1
# classify match
# classify match
full
=
match
and
match
.
start
()
==
0
and
match
.
end
()
==
len
(
line
)
full
=
match
and
match
.
start
()
==
0
and
match
.
end
()
==
len
(
line
)
ignore
=
not
match
and
self
.
coverageIgnore
.
match
(
line
)
ignore
=
not
match
and
(
RE_EMPTY
.
match
(
line
)
or
self
.
coverageIgnore
.
match
(
line
)
)
# setup match label
# setup match label
if
match
:
if
match
:
...
...
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