##// END OF EJS Templates
remove dict() function call and replace it with dict literal - {}
Srinivas Reddy Thatiparthy -
Show More
@@ -1139,7 +1139,7 b' class InteractiveShell(SingletonConfigurable):'
1139 1139
1140 1140 # For more details:
1141 1141 # http://mail.python.org/pipermail/python-dev/2001-April/014068.html
1142 ns = dict()
1142 ns = {}
1143 1143
1144 1144 # make global variables for user access to the histories
1145 1145 ns['_ih'] = self.history_manager.input_hist_parsed
@@ -1367,7 +1367,7 b' class InteractiveShell(SingletonConfigurable):'
1367 1367 if not oname.startswith(ESC_MAGIC) and \
1368 1368 not oname.startswith(ESC_MAGIC2) and \
1369 1369 not py3compat.isidentifier(oname, dotted=True):
1370 return dict(found=False)
1370 return {'found': False}
1371 1371
1372 1372 if namespaces is None:
1373 1373 # Namespaces to search in:
@@ -109,13 +109,13 b" def print_figure(fig, fmt='png', bbox_inches='tight', **kwargs):"
109 109 fmt = 'png'
110 110
111 111 # build keyword args
112 kw = dict(
113 format=fmt,
114 facecolor=fig.get_facecolor(),
115 edgecolor=fig.get_edgecolor(),
116 dpi=dpi,
117 bbox_inches=bbox_inches,
118 )
112 kw = {
113 "format":fmt,
114 "facecolor":fig.get_facecolor(),
115 "edgecolor":fig.get_edgecolor(),
116 "dpi":dpi,
117 "bbox_inches":bbox_inches,
118 }
119 119 # **kwargs get higher priority
120 120 kw.update(kwargs)
121 121
@@ -134,7 +134,7 b' def retina_figure(fig, **kwargs):'
134 134 if pngdata is None:
135 135 return
136 136 w, h = _pngxy(pngdata)
137 metadata = dict(width=w//2, height=h//2)
137 metadata = {"width": w//2, "height":h//2}
138 138 return pngdata, metadata
139 139
140 140 # We need a little factory function here to create the closure where
@@ -383,7 +383,7 b' def configure_inline_support(shell, backend):'
383 383 shell.events.register('post_execute', flush_figures)
384 384
385 385 # Save rcParams that will be overwrittern
386 shell._saved_rcParams = dict()
386 shell._saved_rcParams = {}
387 387 for k in cfg.rc:
388 388 shell._saved_rcParams[k] = matplotlib.rcParams[k]
389 389 # load inline_rc
@@ -1162,7 +1162,7 b' array([[ inf, nan, 2., 3.],'
1162 1162
1163 1163 #ipython_directive.DEBUG = True # dbg
1164 1164 #options = dict(suppress=True) # dbg
1165 options = dict()
1165 options = {}
1166 1166 for example in examples:
1167 1167 content = example.split('\n')
1168 1168 IPythonDirective('debug', arguments=None, options=options,
@@ -39,7 +39,7 b' def multi_filter_str(flt):'
39 39 yield name(flt)
40 40
41 41
42 log_filters = dict(_AndList='And', _OrList='Or')
42 log_filters = {'_AndList': 'And', '_OrList': 'Or'}
43 43 log_invert = {'_Invert'}
44 44
45 45 kbm = KeyBindingManager.for_prompt()
@@ -53,8 +53,8 b' if common_docs:'
53 53
54 54 dummy_docs = list(set(dummy_docs))
55 55
56 single_filter = dict()
57 multi_filter = dict()
56 single_filter = {}
57 multi_filter = {}
58 58 for kb in ipy_bindings:
59 59 doc = kb.handler.__doc__
60 60 if not doc or doc in dummy_docs:
General Comments 0
You need to be logged in to leave comments. Login now