File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1359,7 +1359,7 @@ def show_source(self):
13591359 try :
13601360 source = self .get_source_of_current_name ()
13611361 except SourceNotFound as e :
1362- self .status_bar .message (_ ( str (e ) ))
1362+ self .status_bar .message (str (e ))
13631363 else :
13641364 if self .config .highlight_show_source :
13651365 source = format (PythonLexer ().get_tokens (source ),
Original file line number Diff line number Diff line change @@ -468,19 +468,19 @@ def get_source_of_current_name(self):
468468 if obj is None :
469469 line = self .current_line
470470 if not line .strip ():
471- raise SourceNotFound ("Nothing to get source of" )
471+ raise SourceNotFound (_ ( "Nothing to get source of" ) )
472472 if inspection .is_eval_safe_name (line ):
473473 obj = self .get_object (line )
474474 return inspect .getsource (obj )
475475 except (AttributeError , NameError ) as e :
476- msg = "Cannot get source: " + str (e )
476+ msg = _ ( "Cannot get source: %s" ) % ( str (e ), )
477477 except IOError as e :
478478 msg = str (e )
479479 except TypeError as e :
480480 if "built-in" in str (e ):
481- msg = "Cannot access source of %r" % (obj , )
481+ msg = _ ( "Cannot access source of %r" ) % (obj , )
482482 else :
483- msg = "No source code found for %s" % (self .current_line , )
483+ msg = _ ( "No source code found for %s" ) % (self .current_line , )
484484 raise SourceNotFound (msg )
485485
486486 def set_docstring (self ):
You can’t perform that action at this time.
0 commit comments