We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f99b34 commit 70a657eCopy full SHA for 70a657e
editor.py
@@ -73,15 +73,15 @@ def get_tty_filename():
73
return '/dev/tty'
74
75
76
-def edit(filename=None, contents=None, use_tty=None):
+def edit(filename=None, contents=None, use_tty=None, suffix=None):
77
editor = get_editor()
78
args = [editor] + get_editor_args(os.path.basename(os.path.realpath(editor)))
79
80
if use_tty is None:
81
use_tty = sys.stdin.isatty() and not sys.stdout.isatty()
82
83
if filename is None:
84
- tmp = tempfile.NamedTemporaryFile()
+ tmp = tempfile.NamedTemporaryFile(suffix=suffix)
85
filename = tmp.name
86
87
if contents is not None:
0 commit comments