Skip to content

Commit 2ec84b7

Browse files
committed
use nicer syntax to handle deprecated import
1 parent a14726c commit 2ec84b7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dash/development/base_component.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import abc
22
import inspect
33
import sys
4-
try:
5-
from collections.abc import MutableSequence
6-
except ImportError:
7-
from collections import MutableSequence
8-
94
import six
105

116
from .._utils import patch_collections_abc
127

8+
if six.PY2:
9+
from collections import MutableSequence
10+
else:
11+
from collections.abc import MutableSequence
12+
1313

1414
# pylint: disable=no-init,too-few-public-methods
1515
class ComponentRegistry:

0 commit comments

Comments
 (0)