From 8fab16fc7b9a3755ed4fac2622fa45b1b457cbe2 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 23 Aug 2023 16:49:33 +1200 Subject: [PATCH] buildmimetree.py: reformat --- .config/neomutt/buildmimetree.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.config/neomutt/buildmimetree.py b/.config/neomutt/buildmimetree.py index c16e519..a85ceb6 100755 --- a/.config/neomutt/buildmimetree.py +++ b/.config/neomutt/buildmimetree.py @@ -228,17 +228,13 @@ def collect_inline_images( mimetype = data.headers["Content-Type"] ext = mimetypes.guess_extension(mimetype) - tempfilename = tempfile.mkstemp(prefix="img", suffix=ext, dir=tempdir)[ - 1 - ] - path = pathlib.Path(tempfilename) + tempfilename = tempfile.mkstemp(prefix="img", suffix=ext, dir=tempdir) + path = pathlib.Path(tempfilename[1]) filewriter_fn(path, data.read(), "w+b") relparts.append( - Part( - *mimetype.split("/"), path, cid=info.cid, desc=info.desc - ) + Part(*mimetype.split("/"), path, cid=info.cid, desc=info.desc) ) return relparts @@ -393,7 +389,7 @@ def do_setup( if extensions: editor = f'{editor} --extensions {",".join(extensions)}' if debug_commands: - editor = f'{editor} --debug-commands' + editor = f"{editor} --debug-commands" cmds.cmd('set my_editor="$editor"') cmds.cmd('set my_edit_headers="$edit_headers"') -- 2.39.5