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/601d89eda27a3846c20c76805cb22dedce62a77b?ds=sidebyside;hp=4651eede8452285177aa13714642bf438f97f9ee 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"')