Skip to content

Commit

Permalink
Reformat file with black
Browse files Browse the repository at this point in the history
Reformat the `__init__.py` file in the Celery instrumentation using
`black`, fixing a CI linter error.
  • Loading branch information
unflxw committed Jun 19, 2023
1 parent 2dd9e28 commit 1f4fb59
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ def add(x, y):
from timeit import default_timer
from typing import Collection, Iterable

from celery import signals # pylint: disable=no-name-in-module
from billiard.einfo import ExceptionInfo
from celery import signals # pylint: disable=no-name-in-module

try:
from billiard.einfo import ExceptionWithTraceback # pylint: disable=no-name-in-module
from billiard.einfo import ( # pylint: disable=no-name-in-module
ExceptionWithTraceback,
)
except ImportError:
ExceptionWithTraceback = None

Expand Down Expand Up @@ -279,10 +281,7 @@ def _trace_failure(*args, **kwargs):
if ex is not None:
# Unwrap the actual exception wrapped by billiard's
# `ExceptionInfo` and `ExceptionWithTraceback`.
if (
isinstance(ex, ExceptionInfo)
and ex.exception is not None
):
if isinstance(ex, ExceptionInfo) and ex.exception is not None:
ex = ex.exception

if (
Expand Down

0 comments on commit 1f4fb59

Please sign in to comment.