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

Method __init__

_plotly_utils/basevalidators.py:1755–1772  ·  view source on GitHub ↗
(
        self, plotly_name, parent_name, dflt=None, regex=None, array_ok=False, **kwargs
    )

Source from the content-addressed store, hash-verified

1753 """
1754
1755 def __init__(
1756 self, plotly_name, parent_name, dflt=None, regex=None, array_ok=False, **kwargs
1757 ):
1758 if dflt is None and regex is None:
1759 raise ValueError("One or both of regex and deflt must be specified")
1760
1761 super(SubplotidValidator, self).__init__(
1762 plotly_name=plotly_name, parent_name=parent_name, **kwargs
1763 )
1764
1765 if dflt is not None:
1766 self.base = dflt
1767 else:
1768 # e.g. regex == '/^y([2-9]|[1-9][0-9]+)?$/'
1769 self.base = re.match(r"/\^(\w+)", regex).group(1)
1770
1771 self.regex = self.base + r"(\d*)"
1772 self.array_ok = array_ok
1773
1774 def description(self):
1775 desc = """\

Callers

nothing calls this directly

Calls 2

groupMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected