Skip to content

Commit 5fa98cb

Browse files
committed
Little code simplification
1 parent 9c6e8c4 commit 5fa98cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extruct/uniform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def _uopengraph(extracted):
99
# Ensuring that never empty value is returned if there is a duplicated
1010
# property with non empty value
1111
non_empty_props = {k for k, v in properties if v and v.strip()}
12-
flattened = dict((k, v) for k, v in properties
13-
if k not in non_empty_props or (v and v.strip()))
12+
flattened = {k: v for k, v in properties
13+
if k not in non_empty_props or (v and v.strip())}
1414
t = flattened.pop('og:type', None)
1515
if t:
1616
flattened['@type'] = t

0 commit comments

Comments
 (0)