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

Method __init__

_plotly_utils/basevalidators.py:1980–2006  ·  view source on GitHub ↗
(
        self,
        plotly_name,
        parent_name,
        items,
        free_length=None,
        dimensions=None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

1978 """
1979
1980 def __init__(
1981 self,
1982 plotly_name,
1983 parent_name,
1984 items,
1985 free_length=None,
1986 dimensions=None,
1987 **kwargs,
1988 ):
1989 super(InfoArrayValidator, self).__init__(
1990 plotly_name=plotly_name, parent_name=parent_name, **kwargs
1991 )
1992
1993 self.items = items
1994 self.dimensions = dimensions if dimensions else 1
1995 self.free_length = free_length
1996
1997 # Instantiate validators for each info array element
1998 self.item_validators = []
1999 info_array_items = self.items if isinstance(self.items, list) else [self.items]
2000
2001 for i, item in enumerate(info_array_items):
2002 element_name = "{name}[{i}]".format(name=plotly_name, i=i)
2003 item_validator = InfoArrayValidator.build_validator(
2004 item, element_name, parent_name
2005 )
2006 self.item_validators.append(item_validator)
2007
2008 def description(self):
2009 # Cases

Callers

nothing calls this directly

Calls 3

build_validatorMethod · 0.80
__init__Method · 0.45
formatMethod · 0.45

Tested by

no test coverage detected