From de772524a08a72aca74e8f66fc4713fb8ea670af 2020-10-13 16:57:40 From: Justin Palmer Date: 2020-10-13 16:57:40 Subject: [PATCH] Ran black, reverted changes on utils/io.py. --- diff --git a/IPython/utils/io.py b/IPython/utils/io.py index 39163d7..fab9bae 100644 --- a/IPython/utils/io.py +++ b/IPython/utils/io.py @@ -14,7 +14,6 @@ import sys import tempfile import warnings from warnings import warn -from pathlib import Path from IPython.utils.decorators import undoc from .capture import CapturedIO, capture_output @@ -205,11 +204,11 @@ def temp_pyfile(src, ext='.py'): (filename, open filehandle) It is the caller's responsibility to close the open file and unlink it. """ - fname = Path(tempfile.mkstemp(ext)[1]) - with fname.open('w') as f: + fname = tempfile.mkstemp(ext)[1] + with open(fname,'w') as f: f.write(src) f.flush() - return str(fname) + return fname @undoc def atomic_writing(*args, **kwargs):