From: martin f. krafft Date: Wed, 23 Aug 2023 04:49:33 +0000 (+1200) Subject: buildmimetree.py: reformat X-Git-Url: https://git.madduck.net/etc/neomutt.git/commitdiff_plain/8fab16fc7b9a3755ed4fac2622fa45b1b457cbe2?ds=inline buildmimetree.py: reformat --- 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"')