Skip to content

Commit

Permalink
Refactored assertion tables
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Sep 10, 2018
1 parent c462b26 commit 94d620b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions report.py
Expand Up @@ -377,6 +377,9 @@ def __init__(self, **table_attrs):
.column('XML', _fmt_xml))

def edge(self, u: Reference, v: Reference, attr: Dict[str,object]):
classes = [attr['kind']] if 'kind' in attr else []
if attr.get('ignore', False): classes.append('ignore')
if attr.get('delete', False): classes.append('delete')
self.row((
f'<a href="{_path_link(u, v)}">nein</a>' if attr.get('delete', False) else \
'ignoriert' if attr.get('ignore', False) else 'ja',
Expand All @@ -385,8 +388,8 @@ def edge(self, u: Reference, v: Reference, attr: Dict[str,object]):
v,
attr,
attr.get('comment', ''),
attr.get('xml', '')
))
attr.get('xml', '')),
class_=' '.join(classes))

@staticmethod
def _fmt_source(attrs):
Expand Down

0 comments on commit 94d620b

Please sign in to comment.