##// END OF EJS Templates
A few small fixes so ipythonx works, and PEP-8 cleanups I found along the way.
Fernando Perez -
Show More
@@ -382,6 +382,7 b' class InteractiveShell(Component, Magic):'
382 382 self.hooks.late_startup_hook()
383 383
384 384 def get_ipython(self):
385 """Return the currently running IPython instance."""
385 386 return self
386 387
387 388 #-------------------------------------------------------------------------
@@ -263,7 +263,7 b' def _fixed_getinnerframes(etb, context=1,tb_offset=0):'
263 263
264 264 _parser = PyColorize.Parser()
265 265
266 def _formatTracebackLines(lnum, index, lines, Colors, lvals=None,scheme=None):
266 def _format_traceback_lines(lnum, index, lines, Colors, lvals=None,scheme=None):
267 267 numbers_width = INDENT_SIZE - 1
268 268 res = []
269 269 i = lnum - index
@@ -781,8 +781,8 b' class VerboseTB(TBTools):'
781 781 frames.append(level)
782 782 else:
783 783 frames.append('%s%s' % (level,''.join(
784 _formatTracebackLines(lnum,index,lines,Colors,lvals,
785 col_scheme))))
784 _format_traceback_lines(lnum,index,lines,Colors,lvals,
785 col_scheme))))
786 786
787 787 # Get (safely) a string form of the exception info
788 788 try:
@@ -130,7 +130,7 b' class PrefilterFrontEnd(LineFrontEndBase):'
130 130
131 131
132 132 if not 'banner' in kwargs and self.banner is None:
133 self.banner = self.ipython0.BANNER
133 self.banner = self.ipython0.banner
134 134
135 135 # FIXME: __init__ and start should be two different steps
136 136 self.start()
@@ -211,7 +211,7 b' class Interpreter(object):'
211 211
212 212 #### Public 'Interpreter' interface ########################################
213 213
214 def formatTraceback(self, et, ev, tb, message=''):
214 def format_traceback(self, et, ev, tb, message=''):
215 215 """Put a formatted version of the traceback into value and reraise.
216 216
217 217 When exceptions have to be sent over the network, the traceback
@@ -375,7 +375,6 b' class Interpreter(object):'
375 375 exec code in self.user_ns
376 376 outflag = 0
377 377 except SystemExit:
378 self.resetbuffer()
379 378 self.traceback_trap.args = sys.exc_info()
380 379 except:
381 380 self.traceback_trap.args = sys.exc_info()
@@ -395,7 +394,7 b' class Interpreter(object):'
395 394 python = self.translator(python)
396 395 self.execute_python(python)
397 396
398 def getCommand(self, i=None):
397 def get_command(self, i=None):
399 398 """Gets the ith message in the message_cache.
400 399
401 400 This is implemented here for compatibility with the old ipython1 shell
@@ -387,7 +387,7 b' class EngineService(object, service.Service):'
387 387 # tb=traceback object
388 388 et,ev,tb = sys.exc_info()
389 389 # This call adds attributes to the exception value
390 et,ev,tb = self.shell.formatTraceback(et,ev,tb,msg)
390 et,ev,tb = self.shell.format_traceback(et,ev,tb,msg)
391 391 # Add another attribute
392 392 ev._ipython_engine_info = msg
393 393 f = failure.Failure(ev,et,None)
@@ -444,7 +444,7 b' class EngineService(object, service.Service):'
444 444 msg = {'engineid':self.id,
445 445 'method':'get_result',
446 446 'args':[repr(i)]}
447 d = self.executeAndRaise(msg, self.shell.getCommand, i)
447 d = self.executeAndRaise(msg, self.shell.get_command, i)
448 448 d.addCallback(self.addIDToResult)
449 449 return d
450 450
@@ -877,7 +877,7 b' class ThreadedEngineService(EngineService):'
877 877 # tb=traceback object
878 878 et,ev,tb = sys.exc_info()
879 879 # This call adds attributes to the exception value
880 et,ev,tb = self.shell.formatTraceback(et,ev,tb,msg)
880 et,ev,tb = self.shell.format_traceback(et,ev,tb,msg)
881 881 # Add another attribute
882 882
883 883 # Create a new exception with the new attributes
@@ -228,9 +228,8 b' class IPTester(object):'
228 228 except OSError:
229 229 # This is just a best effort, if we fail or the process was
230 230 # really gone, ignore it.
231 pass
232
233
231 pass
232
234 233
235 234 def make_runners():
236 235 """Define the top-level packages that need to be tested.
General Comments 0
You need to be logged in to leave comments. Login now