MCPcopy Index your code
hub / github.com/plotly/plotly.py / _isinstance_listlike

Function _isinstance_listlike

plotly/express/_core.py:1170–1183  ·  view source on GitHub ↗

Returns True if x is an iterable which can be transformed into a pandas Series, False for the other types of possible values of a `hover_data` dict. A tuple of length 2 is a special case corresponding to a (format, data) tuple.

(x)

Source from the content-addressed store, hash-verified

1168
1169
1170def _isinstance_listlike(x):
1171 """Returns True if x is an iterable which can be transformed into a pandas Series,
1172 False for the other types of possible values of a `hover_data` dict.
1173 A tuple of length 2 is a special case corresponding to a (format, data) tuple.
1174 """
1175 if (
1176 isinstance(x, str)
1177 or (isinstance(x, tuple) and len(x) == 2)
1178 or isinstance(x, bool)
1179 or x is None
1180 ):
1181 return False
1182 else:
1183 return True
1184
1185
1186def _escape_col_name(columns, col_name, extra):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected