##// END OF EJS Templates
Ran black, reverted changes on utils/io.py.
Justin Palmer -
Show More
@@ -14,7 +14,6 b' import sys'
14 14 import tempfile
15 15 import warnings
16 16 from warnings import warn
17 from pathlib import Path
18 17
19 18 from IPython.utils.decorators import undoc
20 19 from .capture import CapturedIO, capture_output
@@ -205,11 +204,11 b" def temp_pyfile(src, ext='.py'):"
205 204 (filename, open filehandle)
206 205 It is the caller's responsibility to close the open file and unlink it.
207 206 """
208 fname = Path(tempfile.mkstemp(ext)[1])
209 with fname.open('w') as f:
207 fname = tempfile.mkstemp(ext)[1]
208 with open(fname,'w') as f:
210 209 f.write(src)
211 210 f.flush()
212 return str(fname)
211 return fname
213 212
214 213 @undoc
215 214 def atomic_writing(*args, **kwargs):
General Comments 0
You need to be logged in to leave comments. Login now