@@ -538,7 +538,7 @@ def _edit_macro(self,mname,macro):
538538 self .shell .hooks .editor (filename )
539539
540540 # and make a new macro object, to replace the old one
541- mvalue = Path (filename ).read_text (encoding = ' utf-8' )
541+ mvalue = Path (filename ).read_text (encoding = " utf-8" )
542542 self .shell .user_ns [mname ] = Macro (mvalue )
543543
544544 @skip_doctest
@@ -728,25 +728,25 @@ def edit(self, parameter_s='',last_call=['','']):
728728 # XXX TODO: should this be generalized for all string vars?
729729 # For now, this is special-cased to blocks created by cpaste
730730 if args .strip () == "pasted_block" :
731- self .shell .user_ns ["pasted_block" ] = filepath .read_text (encoding = ' utf-8' )
731+ self .shell .user_ns ["pasted_block" ] = filepath .read_text (encoding = " utf-8" )
732732
733733 if 'x' in opts : # -x prevents actual execution
734734 print ()
735735 else :
736736 print ('done. Executing edited code...' )
737737 with preserve_keys (self .shell .user_ns , '__file__' ):
738738 if not is_temp :
739- self .shell .user_ns [' __file__' ] = filename
740- if 'r' in opts : # Untranslated IPython code
741- source = filepath .read_text (encoding = ' utf-8' )
739+ self .shell .user_ns [" __file__" ] = filename
740+ if "r" in opts : # Untranslated IPython code
741+ source = filepath .read_text (encoding = " utf-8" )
742742 self .shell .run_cell (source , store_history = False )
743743 else :
744744 self .shell .safe_execfile (filename , self .shell .user_ns ,
745745 self .shell .user_ns )
746746
747747 if is_temp :
748748 try :
749- return filepath .read_text (encoding = ' utf-8' )
749+ return filepath .read_text (encoding = " utf-8" )
750750 except IOError as msg :
751751 if Path (msg .filename ) == filepath :
752752 warn ('File not found. Did you forget to save?' )
0 commit comments