Skip to content

Commit 4189ed6

Browse files
committed
more adjustments for lint
1 parent 52de22e commit 4189ed6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dash/dash.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,18 +449,18 @@ def __init__( # pylint: disable=too-many-statements
449449

450450
if use_async is None:
451451
try:
452-
import asgiref # pylint: disable=unused-import # noqa
452+
import asgiref # pylint: disable=unused-import, import-outside-toplevel # noqa
453453

454454
use_async = True
455455
except ImportError:
456456
pass
457457
elif use_async:
458458
try:
459-
import asgiref # pylint: disable=unused-import # noqa
460-
except ImportError:
459+
import asgiref # pylint: disable=unused-import, import-outside-toplevel # noqa
460+
except ImportError as exc:
461461
raise Exception(
462462
"You are trying to use dash[async] without having installed the requirements please install via: `pip install dash[async]`"
463-
)
463+
) from exc
464464

465465
_validate.check_obsolete(obsolete)
466466

0 commit comments

Comments
 (0)