From 698a673996cc8a0392f512050ed3f3da13de075f Mon Sep 17 00:00:00 2001 From: wavpro <31097540+wavpro@users.noreply.github.com> Date: Sat, 13 Aug 2022 21:05:42 +0200 Subject: [PATCH 1/3] Update python.js From 8cbd3c8d8673a038a8a3ce29db24e59dc4f72443 Mon Sep 17 00:00:00 2001 From: wavpro <31097540+wavpro@users.noreply.github.com> Date: Sat, 13 Aug 2022 21:12:13 +0200 Subject: [PATCH 2/3] Fixed linting issues --- src/lib/generateCode/targets/python.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/generateCode/targets/python.js b/src/lib/generateCode/targets/python.js index b563b70..36c8977 100644 --- a/src/lib/generateCode/targets/python.js +++ b/src/lib/generateCode/targets/python.js @@ -20,12 +20,12 @@ function parseBody(body) { } if (mime === 'application/json' && body.text) { - return `payload = ${JSON.stringify(JSON.parse(body.text), null, 2)}`; + return `payload = ${JSON.stringify(JSON.parse(body.text), null, 2)}\n\nfiles = null`; } return body.text - ? `payload = '${body.text}'` - : null; + ? `payload = '${body.text}\n\nfiles = null` + : 'files = null'; } export default function python(url, req) { From 8feb433cf3e820fff44bcd99792feec59533b1bc Mon Sep 17 00:00:00 2001 From: wavpro <31097540+wavpro@users.noreply.github.com> Date: Sat, 13 Aug 2022 21:16:13 +0200 Subject: [PATCH 3/3] Added ' --- src/lib/generateCode/targets/python.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/generateCode/targets/python.js b/src/lib/generateCode/targets/python.js index 36c8977..403afb9 100644 --- a/src/lib/generateCode/targets/python.js +++ b/src/lib/generateCode/targets/python.js @@ -24,7 +24,7 @@ function parseBody(body) { } return body.text - ? `payload = '${body.text}\n\nfiles = null` + ? `payload = '${body.text}'\n\nfiles = null` : 'files = null'; }