Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Sep 3, 2020
1 parent 83db0b6 commit 943c382
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/scout_apm/instruments/aioredis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions tests/integration/instruments/test_aioredis_py36plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
),
)


Expand Down Expand Up @@ -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."
),
)


Expand Down

0 comments on commit 943c382

Please sign in to comment.