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

Method __init__

_plotly_utils/basevalidators.py:714–740  ·  view source on GitHub ↗
(
        self, plotly_name, parent_name, min=None, max=None, array_ok=False, **kwargs
    )

Source from the content-addressed store, hash-verified

712 """
713
714 def __init__(
715 self, plotly_name, parent_name, min=None, max=None, array_ok=False, **kwargs
716 ):
717 super(NumberValidator, self).__init__(
718 plotly_name=plotly_name, parent_name=parent_name, **kwargs
719 )
720
721 # Handle min
722 if min is None and max is not None:
723 # Max was specified, so make min -inf
724 self.min_val = float("-inf")
725 else:
726 self.min_val = min
727
728 # Handle max
729 if max is None and min is not None:
730 # Min was specified, so make min inf
731 self.max_val = float("inf")
732 else:
733 self.max_val = max
734
735 if min is not None or max is not None:
736 self.has_min_max = True
737 else:
738 self.has_min_max = False
739
740 self.array_ok = array_ok
741
742 def description(self):
743 desc = """\

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected