From cd04e9d9bb6ceca3e22c1688d8876371a379dbf3 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 12 Sep 2021 09:41:07 +0000 Subject: [PATCH] Format code with yapf This commit fixes the style issues introduced in e787514 according to the output from yapf. Details: https://deepsource.io/gh/kokarare1212/librespot-python/transform/6b6b51b6-8693-477f-9456-739e2136ae57/ --- librespot/core.py | 8 +++++--- librespot/mercury.py | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/librespot/core.py b/librespot/core.py index c9f4563..c42c305 100644 --- a/librespot/core.py +++ b/librespot/core.py @@ -1607,8 +1607,9 @@ class SearchManager: request.set_country(self.__session.country_code) if request.get_locale() == "": request.set_locale(self.__session.preferred_locale()) - response = self.__session.mercury().send_sync(RawMercuryRequest.new_builder() - .set_method("GET").set_uri(request.build_url()).build()) + response = self.__session.mercury().send_sync( + RawMercuryRequest.new_builder().set_method("GET").set_uri( + request.build_url()).build()) if response.status_code != 200: raise SearchManager.SearchException(response.status_code) return json.loads(response.payload) @@ -1668,7 +1669,8 @@ class SearchManager: self.__country = country return self - def set_image_size(self, image_size: str) -> SearchManager.SearchRequest: + def set_image_size(self, + image_size: str) -> SearchManager.SearchRequest: self.__image_size = image_size return self diff --git a/librespot/mercury.py b/librespot/mercury.py index 57a61aa..e2e3a56 100644 --- a/librespot/mercury.py +++ b/librespot/mercury.py @@ -269,8 +269,7 @@ class MercuryClient(Closeable, PacketsReceiver): payload: bytes status_code: int - def __init__(self, header: Mercury.Header, - payload: list[bytes]): + def __init__(self, header: Mercury.Header, payload: list[bytes]): self.uri = header.uri self.status_code = header.status_code self.payload = b"".join(payload[1:])