From 5f0cb289c1d91513427ffdc8f646bc86516c2759 Mon Sep 17 00:00:00 2001 From: nico Date: Mon, 29 Jun 2020 11:03:49 +0200 Subject: black reformat * black reformatted the code --- api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'api.py') diff --git a/api.py b/api.py index b14fa52..3372976 100644 --- a/api.py +++ b/api.py @@ -9,6 +9,7 @@ class EjabberdApi: """ class to interact with the ejabberd rest/ xmlrpc api """ + def __init__(self, url, login=None, api: str = "rpc"): # api variables self._login = login @@ -25,7 +26,7 @@ class EjabberdApi: @property def _auth(self) -> (str, None): if self._login is not None: - return f"{self._login['user']}@{self._login['server']}", self._login['password'] + return f"{self._login['user']}@{self._login['server']}", self._login["password"] return None def _rest(self, command: str, data) -> dict: @@ -34,7 +35,7 @@ class EjabberdApi: self.session.auth = self._auth # post - r = self.session.post('/'.join([self._url, command]), json=data) + r = self.session.post("/".join([self._url, command]), json=data) # proceed if response is ok if r.ok: -- cgit v1.2.3-18-g5258