Skip to content

Commit a5a42f6

Browse files
committed
util.MarkDiff: joining None results in an error
1 parent cd77a93 commit a5a42f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

udapi/block/util/markdiff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def process_tree(self, tree):
6262
if len(pred_nodes) != len(gold_nodes) and self.mark_attr:
6363
tree.add_comment(f'{self.mark_attr} = {self.mark}')
6464
gold_tree.add_comment(f'{self.mark_attr} = {self.mark}')
65-
pred_tokens = ['_'.join(n.get_attrs(self.attrs)) for n in pred_nodes]
66-
gold_tokens = ['_'.join(n.get_attrs(self.attrs)) for n in gold_nodes]
65+
pred_tokens = ['_'.join(n.get_attrs(self.attrs, undefs="_")) for n in pred_nodes]
66+
gold_tokens = ['_'.join(n.get_attrs(self.attrs, undefs="_")) for n in gold_nodes]
6767
matcher = difflib.SequenceMatcher(None, pred_tokens, gold_tokens, autojunk=False)
6868
diffs = list(matcher.get_opcodes())
6969

0 commit comments

Comments
 (0)