Skip to content

Commit d2cbd6d

Browse files
committed
we can use dictionary comprehensions now, yay!
1 parent e11bdc2 commit d2cbd6d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

plotly/utils.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ def load_json_dict(filename, *args):
5252
data = {} # TODO: issue a warning and bubble it up
5353
lock.release()
5454
if args:
55-
d = dict()
56-
for key in args:
57-
if key in data:
58-
d[key] = data[key]
59-
return d
60-
# TODO: replace with below if we drop Python 2.6 compatibility
61-
# return {key: data[key] for key in args if key in data}
55+
return {key: data[key] for key in args if key in data}
6256
return data
6357

6458

0 commit comments

Comments
 (0)