Skip to content

Commit 5e7c133

Browse files
single line for the mapping assignment block
1 parent 1aa0c32 commit 5e7c133

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

primeqa/mitqa/utils/link_predictor.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,8 @@ def predict_link_for_tables(args,retrieved_data,doc_retriever):
273273
continue
274274

275275
for k, v in dataset.mapping.items():
276-
if k not in mapping:
277-
mapping[k] = v
278-
else:
279-
mapping[k].extend(v)
276+
mapping[k] = v if k not in mapping else mapping[k].extend(v)
277+
280278

281279
new_data = []
282280
for d in retrieved_data:

0 commit comments

Comments
 (0)