From 2d087a7ced3f8c0e63cbac0f209740864d25dd6c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 3 Sep 2020 17:30:10 +0100 Subject: [PATCH] codestyle --- src/scout_apm/instruments/aioredis.py | 8 +++++--- .../integration/instruments/test_aioredis_py36plus.py | 10 ++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/scout_apm/instruments/aioredis.py b/src/scout_apm/instruments/aioredis.py index aef152cc..0ab4f792 100644 --- a/src/scout_apm/instruments/aioredis.py +++ b/src/scout_apm/instruments/aioredis.py @@ -16,8 +16,8 @@ # The async_ module can only be shipped on Python 3.6+ try: from scout_apm.async_.instruments.aioredis import ( - wrapped_redis_execute, wrapped_pipeline_execute, + wrapped_redis_execute, ) except ImportError: wrapped_redis_execute = None @@ -38,7 +38,8 @@ def ensure_installed(): logger.debug("Couldn't import aioredis.Redis - probably not installed.") elif wrapped_redis_execute is None: logger.debug( - "Couldn't import scout_apm.async_.instruments.aioredis - probably using Python < 3.6." + "Couldn't import scout_apm.async_.instruments.aioredis -" + + " probably using Python < 3.6." ) elif not have_patched_redis_execute: try: @@ -58,7 +59,8 @@ def ensure_installed(): ) elif wrapped_pipeline_execute is None: logger.debug( - "Couldn't import scout_apm.async_.instruments.aioredis - probably using Python < 3.6." + "Couldn't import scout_apm.async_.instruments.aioredis -" + + " probably using Python < 3.6." ) elif not have_patched_pipeline_execute: try: diff --git a/tests/integration/instruments/test_aioredis_py36plus.py b/tests/integration/instruments/test_aioredis_py36plus.py index 5e719622..991598e9 100644 --- a/tests/integration/instruments/test_aioredis_py36plus.py +++ b/tests/integration/instruments/test_aioredis_py36plus.py @@ -77,7 +77,10 @@ def test_ensure_installed_fail_no_wrapped_redis_execute(caplog): assert caplog.record_tuples[1] == ( "scout_apm.instruments.aioredis", logging.DEBUG, - "Couldn't import scout_apm.async_.instruments.aioredis - probably using Python < 3.6.", + ( + "Couldn't import scout_apm.async_.instruments.aioredis - probably" + + " using Python < 3.6." + ), ) @@ -124,7 +127,10 @@ def test_ensure_installed_fail_no_wrapped_pipeline_execute(caplog): assert caplog.record_tuples[1] == ( "scout_apm.instruments.aioredis", logging.DEBUG, - "Couldn't import scout_apm.async_.instruments.aioredis - probably using Python < 3.6.", + ( + "Couldn't import scout_apm.async_.instruments.aioredis -" + + " probably using Python < 3.6." + ), )