diff --git a/amqtt/client.py b/amqtt/client.py index b6611779..ec018d3e 100644 --- a/amqtt/client.py +++ b/amqtt/client.py @@ -244,7 +244,7 @@ async def reconnect(self, cleansession=None): "Maximum number of connection attempts reached. Reconnection aborted" ) raise ConnectException("Too many connection attempts failed") from e - exp = 2 ** nb_attempt + exp = 2**nb_attempt delay = exp if exp < reconnect_max_interval else reconnect_max_interval self.logger.debug("Waiting %d second before next attempt" % delay) await asyncio.sleep(delay, loop=self._loop) diff --git a/docs/conf.py b/docs/conf.py index 3283c91a..c50a51d2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -306,7 +306,6 @@ def setup(app): # app.add_javascript("custom.js") app.add_stylesheet("theme_overrides.css") - else: # Override default css to get a larger width for ReadTheDoc build html_context = { diff --git a/tests/plugins/test_plugins.py b/tests/plugins/test_plugins.py index bfacac3b..284421e9 100644 --- a/tests/plugins/test_plugins.py +++ b/tests/plugins/test_plugins.py @@ -29,11 +29,13 @@ def _verify_module(module, plugin_module_name): continue obj = clazz(_TestContext()) - with pytest.raises(AttributeError, match=f"'{name}' object has no attribute '{_INVALID_METHOD}'"): + with pytest.raises( + AttributeError, + match=f"'{name}' object has no attribute '{_INVALID_METHOD}'", + ): getattr(obj, _INVALID_METHOD) assert hasattr(obj, _INVALID_METHOD) is False - for name, obj in inspect.getmembers(module, inspect.ismodule): _verify_module(obj, plugin_module_name)