File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -449,18 +449,18 @@ def __init__( # pylint: disable=too-many-statements
449
449
450
450
if use_async is None :
451
451
try :
452
- import asgiref # pylint: disable=unused-import # noqa
452
+ import asgiref # pylint: disable=unused-import, import-outside-toplevel # noqa
453
453
454
454
use_async = True
455
455
except ImportError :
456
456
pass
457
457
elif use_async :
458
458
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 :
461
461
raise Exception (
462
462
"You are trying to use dash[async] without having installed the requirements please install via: `pip install dash[async]`"
463
- )
463
+ ) from exc
464
464
465
465
_validate .check_obsolete (obsolete )
466
466
You can’t perform that action at this time.
0 commit comments