From d09a5d1b9e008645683dc6920f863aab6c9c2147 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 9 Feb 2022 23:37:00 +0100 Subject: [PATCH] Formatting fixes for failing tests. --- errbot/core.py | 2 +- errbot/core_plugins/webserver.py | 2 +- tests/webhooks_test.py | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/errbot/core.py b/errbot/core.py index 4273aab37..83ca407e9 100644 --- a/errbot/core.py +++ b/errbot/core.py @@ -825,7 +825,7 @@ def get_doc(self, command: Callable) -> str: if self.prefix == "!": return command.__doc__ ununderscore_keys = (m.replace("_", " ") for m in self.all_commands.keys()) - pat = re.compile(fr'!({"|".join(ununderscore_keys)})') + pat = re.compile(rf'!({"|".join(ununderscore_keys)})') return re.sub(pat, self.prefix + "\1", command.__doc__) @staticmethod diff --git a/errbot/core_plugins/webserver.py b/errbot/core_plugins/webserver.py index b4b7800dd..8ed75bbad 100644 --- a/errbot/core_plugins/webserver.py +++ b/errbot/core_plugins/webserver.py @@ -1,6 +1,6 @@ +import logging import os import sys -import logging from json import loads from random import randrange from threading import Thread diff --git a/tests/webhooks_test.py b/tests/webhooks_test.py index e13063d32..62ae6135a 100644 --- a/tests/webhooks_test.py +++ b/tests/webhooks_test.py @@ -185,14 +185,11 @@ def test_generate_certificate_creates_usable_cert(webhook_testbot): requests.packages.urllib3.exceptions.InsecureRequestWarning ) - assert ( - requests.post( - "https://localhost:{}/webhook1".format(WEBSERVER_SSL_PORT), - JSONOBJECT, - verify=False, - ).text - == repr(json.loads(JSONOBJECT)) - ) + assert requests.post( + "https://localhost:{}/webhook1".format(WEBSERVER_SSL_PORT), + JSONOBJECT, + verify=False, + ).text == repr(json.loads(JSONOBJECT)) def test_custom_headers_and_status_codes(webhook_testbot):