From 9f14bc5ab2417142d2bd209ddb29ee991f234660 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Wed, 30 Sep 2020 10:12:54 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- simplipy/camera.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/simplipy/camera.py b/simplipy/camera.py index d49f947d..eee70bde 100644 --- a/simplipy/camera.py +++ b/simplipy/camera.py @@ -49,11 +49,9 @@ def video_url(self, width=1280, params={"audioEncoding": "AAC"}) -> str: :rtype: ``str`` """ - additionalParams = [] - for param in params: - additionalParams.append("{}={}".format(param, params[param])) + additionalParams = ["{}={}".format(param, params[param]) for param in params] additionalParamsUrl = "" - if len(additionalParams) > 0: + if additionalParams: additionalParamsUrl = "&{}".format("&".join(additionalParams)) return "https://media.simplisafe.com/v1/{}/flv?x={}{}".format(