From 9427eb28fac6e713ebcdf36acdaf84675faa20a6 2021-03-26 23:36:59 From: Paul Bissex Date: 2021-03-26 23:36:59 Subject: [PATCH] Fixed lint issue --- diff --git a/IPython/core/magics/code.py b/IPython/core/magics/code.py index ac2cb93..e5b2ce1 100644 --- a/IPython/core/magics/code.py +++ b/IPython/core/magics/code.py @@ -267,14 +267,18 @@ class CodeMagics(Magics): print(e.args[0]) return - post_data = urlencode({ - "title": opts.get('d', "Pasted from IPython"), - "syntax": "python", - "content": code - }).encode('utf-8') - - request = Request("http://dpaste.com/api/v2/", - headers={"User-Agent": "IPython v{}".format(version)}) + post_data = urlencode( + { + "title": opts.get("d", "Pasted from IPython"), + "syntax": "python", + "content": code, + } + ).encode("utf-8") + + request = Request( + "http://dpaste.com/api/v2/", + headers={"User-Agent": "IPython v{}".format(version)}, + ) response = urlopen(request, post_data) return response.headers.get('Location')