Skip to content

Fix warning regarding ABC import from collections #2728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/python/plotly/plotly/figure_factory/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import absolute_import

import collections
import decimal
import six

Expand All @@ -24,9 +23,14 @@
validate_scale_values,
)

try:
from collections.abc import Sequence
except ImportError:
from collections import Sequence


def is_sequence(obj):
return isinstance(obj, collections.Sequence) and not isinstance(obj, str)
return isinstance(obj, Sequence) and not isinstance(obj, str)


def validate_index(index_vals):
Expand Down